[>=17.10][<=19.04] Customizing Numix icon themes in modern Ubuntu

Preface

The Numix icon suite is a very robust and vivid icon theme intended for people who want a colourful material-like appearance. Often, themes are made to go around the icon suite, or the icon suite's commitment to flat design conventions are useid to compliment a material / flat theme where it works.

The only issue, for many people is it comes in orange. A very bright, lurid orange. And for some people that's a problem. Nonetheless there is a way provided by the same team that made the theme to customize it easily, to their specifications and even use iterations of the icon design that didn't make it in the final release.

Installation

Preliminary steps

:warning: This software, even for Ubuntu Eoan has not been created for use with GNOME PolicyKit. As this is the case, it requires you install gksu, a guide which is provided in this section.

:install: For best results, if you have other iterations of Numix from different PPAs installed, remove them. Numix's own PPA will be used instead, which generally has the latest theme files. Optionally, you should remove any PPAs for themes you are not using to ensure no conflicts. Else you may have to specify version along with package name with apt, also explained here.

If you had attempted to install numix-folders before, you may have noticed it depends on something which you can no longer retrieve in Ubuntu software repositories since Artful Aardvark. That thing is gksu, and I wrote a whole guide about installing that here.:dagger:

:dagger:It's really the installation steps preloaded with more warnings than any retail product in California, USA. But there's a good reason for that, and such warnings should be respected.

Otherwise, if you don't already have the Numix theme, you can install it right now without needing to use a PPA, however since the software we need's going to be there anyway, may as well add it, like so:

:heavy_dollar_sign: In x-terminal-emulator:

sudo add-apt-repository -y ppa:numix/ppa

If repository update doesn't happen immediately, also do sudo apt update.

Once added, then you can install the following with confidence it is the most current version for your build of Ubuntu:cow::

:heavy_dollar_sign: In x-terminal-emulator:

sudo apt install -y numix-icon-theme-circle

:install: This will also install numix-icon-theme. If you don't want the circle themes just install the base theme alone; numix-folders will affect the icons for it regardless!

:cow: Is apt being a dumb cow and installing a version of Numix not from the Numix PPA? Information on how to install a specific version below!

Forcing specific version

If apt is somehow under the strange belief that another version of Numix from different PPA is the absolute latest version for your system, even though it isn't then you may need to commit some additional steps for making apt less dumb. Should this be the case, perform the following;

:heavy_dollar_sign: In x-terminal-emulator:

apt policy numix-icon-theme
apt policy numix-icon-theme-circle

Since the procedure for both is the same, I will only show sample output for the base theme:

:spiral_notepad: Sample output of apt policy numix-icon-theme:

numix-icon-theme:
  Installed: 0.3+942~201909171617~ubuntu19.04.1
  Candidate: 0.3+942~201909171617~ubuntu19.04.1
  Version table:
 *** 0.3+942~201909171617~ubuntu19.04.1 500
        500 http://ppa.launchpad.net/numix/ppa/ubuntu disco/main amd64 Packages
        500 http://ppa.launchpad.net/numix/ppa/ubuntu disco/main i386 Packages
        100 /var/lib/dpkg/status
     0~20180717-1 500
        500 http://mirror.steadfastnet.com/ubuntu disco/universe amd64 Packages
        500 http://mirror.steadfastnet.com/ubuntu disco/universe i386 Packages

Pretty hard to read, huh? The version with the three asterisks shows the currently installed version, at least for my build of Ubuntu and I got there by doing the following:

:heavy_dollar_sign: In x-terminal-emulator:

sudo apt install numix-icon-theme=0.3+942~201909171617~ubuntu19.04.1
sudo apt-mark hold numix-icon-theme

:reminder_ribbon: The HTTP status of the package (often 500) is not part of the version number. Newbies may be tripped up and invalidate the command by cluelessly including this.

:pause_button: apt-mark can affect muiltiple packages at once, space-delimited. If you install all "Outdated" packages first you can then add hold status to them, all at once.

Means to customize

With that out of the way, you can now install as follows;

:heavy_dollar_sign: In x-terminal-emulator:

sudo apt install -y numix-folders
numix-folders

Software use

Once both procedures are done, numix-folders will be installed and you will be greeted to a prompt for your password (permissions via gksu), after which you will be granted the capability to tinker with the Numix theme.

Applying changes globally

If you want changes to be applied to the theme you installed via PPA, you can use numix-folders as is and so long there is not another copy of the directories this software will affect in a user's home directory, it will touch directories in /usr/share/icons. For a single-user environment, or for a multi-user environment without option to personalize except for a company's brand image this it a great option to exercise, being it would be your only one.

:hash: You must run this software with gksu or sudo in order to affect the global Numix theme.

Applying changes per-user

Understanding how this works
However, if you are in a multi-user environment, and you wish to perform changes per-account you would need to sign into each user instance or use sudo to sign in as another user while in your own session. Most likely, if in a multi-user environment everybody interested in a personalized variety of Numix would use this software anyway.

There is a key differentiating factor with this method; You don't need elevation to do this in a user's active session. This works because a user copy is being modified, which numix-folders supports.

This portion of its code proves the above:

:spiral_notepad: Sample code from /opt/numix-folders/numix-folders:

if [ "$runmode" -eq 2 ]; then
    if [ -d /home/"$cuser"/.local/share/icons/Numix/ ]; then
        dir=/home/"$cuser"/.local/share/icons
    elif [ -d /home/"$cuser"/.icons/Numix ]; then
        dir=/home/"$cuser"/.icons
    elif [ -d /usr/share/icons/Numix/ ]; then
        if [[ $UID -ne 0 ]]; then
            scriptname=$(readlink -f "$0")
            exec gksudo "$scriptname"
        else
            dir=/usr/share/icons
        fi
    else
        "$scriptpath"/gui/error
        exit

Practical application
As seen, /home/"$cuser"/.icons comes before /usr/share/icons which proves the declaration stated above the code block prior. So to take advantage of this for the current user, this is all you need to do:

:heavy_dollar_sign: In x-terminal-emulator:

mkdir ~/.icons
cp -R /usr/share/icons/Numix ~/.icons
numix-folders

:key: If gksu doesn't prompt for password, that's alright; this is all being done for the active user, not for the system's global copy!

Make your changes and apply them, so the user copy of Numix is modified. Once finished, you can take things a step further by renaming all of the directories in ~/.icons which begin with the name Numix to something else, and make the following changes as shown in each of these code blocks:

Example modifications

:fast_forward: For brevity, we will assume the names of these directories are appended with the phrase mod_ at the beginning. So for this we are assuming these directory names in ~/.icons:

  • mod_Numix
  • mod_Numix-Circle
  • mod_Numix-Circle-Light
  • mod_Numix-Light

Even one character is enough for numix-folders to leave these directories alone after modification, so for multiple selections, follow these examples multiple times.

mod_Numix

:spiral_notepad: Sample modified text for ~/.icons/mod_Numix/index.theme:

[Icon Theme]
Name=Modified Numix
Comment=Icon theme from Numix Project
Inherits=gnome,hicolor 

mod_Numix-Circle

:spiral_notepad: Sample modified text for ~/.icons/mod_Numix-Circle/index.theme:

[Icon Theme]
Name=Modified Numix Circle
Comment=Numix icon theme with a circular apps icons design
Inherits=mod_Numix

mod_Numix-Circle-Light

:spiral_notepad: Sample modified text for ~/.icons/mod_Numix-Circle-Light/index.theme:

[Icon Theme]
Name=Modifid Numix Circle Light
Comment=Numix icon theme with a circular apps icons design for use with light themes
Inherits=mod_Numix-Light

mod_Numix-Light

:spiral_notepad: Sample modified text for ~/.icons/mod_Numix-Light/index.theme:

[Icon Theme]
Name=Modified Numix Light
Comment=Icon for light themes from Numix Project
Inherits=mod_Numix

:reminder_ribbon: These are only example names! You can use whatever names you want for your modified Numix icons, just note whatever directory names you use applies for Inherits definitions. If that doesn't match to an existing subdirectory in any recognized directory, Inherits means nothing! Also note; for Inherits, user directories come before system directories.

When finished, if following the examples above exactly as shown directories which you had renamed will function correctly and show as entirely separate entries in mate-appearance-properties' Icons tab. It's a bit tedious, but it can help to avoid future confusion if using multiple variations.

Caveats

The application itself still has some issues, as any time you try to do something there are some tracebacks, and there is also an outdated means of messaging the user, as GNOME complains about that even though this package exists for 19.10 beta.

The colour picker selection and colour textbox are only linked together one way; you can choose colours using the selection dialog but until you actually type a value nothing ever applies to the preview. Bear this in mind when modifying the theme via this tool with the Custom colour option.

It uses flippin' gksu. They have to fix that before Eoan goes gold, honestly.

1 Like

Very useful. Thank you !

Nice. I now have a real Ubuntu-MATE feel for my folders. :wink:

Dope. I'm gonna drop a cap in My Desktop Today shortly after I figure out how to modify the theme I am using to be all matchy-matchy. Canta uses Numix orange for radio buttons, which is a massive ugh when having tinkered with Numix via this tool.

In typical fashion I somehow balloon the size of any initial post i make twofold with oodles of extra information. The "Day-one patch" in my most recent update includes information about user-specific theming with proofs and examples users can follow along with.