Choose style:

Author Topic: Custom Numix Colors Not Working (FIX RELEASED)  (Read 108 times)

0 Members and 1 Guest are viewing this topic.

Offline drkmttr

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 5
    • View Profile
  • Peppermint version(s): Ten
Custom Numix Colors Not Working (FIX RELEASED)
« on: July 02, 2019, 03:25:37 pm »
Is anyone else able to create custom Numix colors in Peppermint 10? When I run the GUI from Peppermint Settings Panel it kicks off the /opt/numix-folders/numix-folders script. If I select any style and then Custom for the colors and select the primary, secondary, and symbol and apply...it uses the existing color.

Trying the CLI route, I get some error messages:
Code: [Select]
sudo /opt/numix-folders/numix-folders -t
[sudo] password for mike:
Which folder style do you want? 1
Which folder colour do you want? custom
grep: styles/1/Numix/48/places/custom-folder-video.svg: No such file or directory
grep: styles/1/Numix/48/places/custom-folder-video.svg: No such file or directory
grep: styles/1/Numix/48/places/custom-folder-video.svg: No such file or directory
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
Folder change complete!

From what I can tell that custom-folder-video.svg file does exist in the script directory. I took a look at the script itself as well as the Python gui script but the issue isn't obvious to me. In terms of the gui, it seems like selecting colors has no effect and it defaults to the existing colors. The script run via CLI doesn't change the colors and ends up replacing all icons with the custom default black.

Thoughts?
« Last Edit: July 02, 2019, 06:40:47 pm by PCNetSpec »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25095
  • Karma: 2778
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Custom Numix Colors Not Working
« Reply #1 on: July 02, 2019, 04:11:48 pm »
I have no idea why relative paths aren't working in that script, but if you enter the FULL paths it works (kinda) .. run:
Code: [Select]
gksudo xed /opt/numix-folders/numix-folders
find the section that reads:-
Code: [Select]
                    if [[ $answer == "custom" ]]; then
                        if grep -q "replacecolour1" styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose primary colour in hex notation (default: $col1def): " colour1
                            if [ -z "$colour1" ]; then
                                colour1=$col1def
                            fi
                            checkhex $colour1
                        fi
                        if grep -q "replacecolour2" styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose secondary colour in hex notation (default: $col2def): " colour2
                            if [ -z "$colour2" ]; then
                                colour2=$col2def
                            fi
                            checkhex $colour2
                        fi
                        if grep -q "replacecolour3" styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose symbol colour in hex notation (default: $col3def): " colour3
                            if [ -z "$colour3" ]; then
                                colour3=$col3def
                            fi
                            checkhex $colour3
                        fi
and change it to read:-
Code: [Select]
                    if [[ $answer == "custom" ]]; then
                        if grep -q "replacecolour1" /opt/numix-folders/styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose primary colour in hex notation (default: $col1def): " colour1
                            if [ -z "$colour1" ]; then
                                colour1=$col1def
                            fi
                            checkhex $colour1
                        fi
                        if grep -q "replacecolour2" /opt/numix-folders/styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose secondary colour in hex notation (default: $col2def): " colour2
                            if [ -z "$colour2" ]; then
                                colour2=$col2def
                            fi
                            checkhex $colour2
                        fi
                        if grep -q "replacecolour3" /opt/numix-folders/styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose symbol colour in hex notation (default: $col3def): " colour3
                            if [ -z "$colour3" ]; then
                                colour3=$col3def
                            fi
                            checkhex $colour3
                        fi
SAVE the file and exit the text editor.

Now the script works from the CLI

It also works from the GUI if you enter the #HEX values for the colours .. but not if you select the colours by clicking on the boxes.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline drkmttr

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 5
    • View Profile
  • Peppermint version(s): Ten
Re: Custom Numix Colors Not Working
« Reply #2 on: July 02, 2019, 04:23:19 pm »
Nice find!  :)

I had played around with the scriptpath variable but it seems like it should work correctly with no argument provided.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25095
  • Karma: 2778
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Custom Numix Colors Not Working
« Reply #3 on: July 02, 2019, 05:34:12 pm »
it does actually work with the $scriptpath variable .. in fact I'm about to push an update to numix-folders that uses it.

as in:-
Code: [Select]
                    if [[ $answer == "custom" ]]; then
                        if grep -q "replacecolour1" "$scriptpath"/styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose primary colour in hex notation (default: $col1def): " colour1
                            if [ -z "$colour1" ]; then
                                colour1=$col1def
                            fi
                            checkhex $colour1
                        fi
                        if grep -q "replacecolour2" "$scriptpath"/styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose secondary colour in hex notation (default: $col2def): " colour2
                            if [ -z "$colour2" ]; then
                                colour2=$col2def
                            fi
                            checkhex $colour2
                        fi
                        if grep -q "replacecolour3" "$scriptpath"/styles/"${style}"/Numix/48/places/custom-folder-video.svg; then
                            read -r -p "Choose symbol colour in hex notation (default: $col3def): " colour3
                            if [ -z "$colour3" ]; then
                                colour3=$col3def
                            fi
                            checkhex $colour3
                        fi
« Last Edit: July 02, 2019, 05:39:16 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25095
  • Karma: 2778
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Custom Numix Colors Not Working
« Reply #4 on: July 02, 2019, 06:24:46 pm »
FIX RELEASED as an automatic update.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline drkmttr

  • Jr. Member
  • **
  • Posts: 31
  • Karma: 5
    • View Profile
  • Peppermint version(s): Ten
Re: Custom Numix Colors Not Working (FIX RELEASED)
« Reply #5 on: July 02, 2019, 07:20:27 pm »
Awesome! Thanks for the quick fix!