Change Which Icon an Applet Uses – How to Guide

appleticonsthemes

I just installed the clipboard manager Diodon.

sudo add-apt-repository ppa:diodon-team/stable
sudo apt-get update
sudo apt-get install diodon

By default, it uses a dark gtk-paste icon when I use the Faenza-Dark icon theme.

enter image description here

Instead, I want it to use the gtk-paste icon from the Faenza-Darkest icon theme.
enter image description here

But rather than replace the icon inside the theme, how can I simply tell Diodon to use X icon instead? I've read all suggested questions before posting this, but they lean more towards replacing the icon rather than telling it to use different one.

Best Answer

I think you have four options:

  1. Use the Faenza-Darkest icon theme. (Is there a reason to not do this?)
  2. Replace the icon (which you don't want to do).
  3. Edit the app's configuration to change the icon.
  4. Make your own lightweight icon theme to set your desired icon.

Edit the app's configuration to change the icon

Edit /usr/share/applications/diodon.desktop and change Icon=gtk-paste to Icon=/usr/share/icons/Faenza-Darkest/actions/22/gtk-paste.png

Note that editing system files is generally a bad idea. You might be able to copy diodon.desktop to ~/.local/share/applications/diodon.desktop and then edit it. I'm not sure if that would work.

Make your own lightweight icon theme to set your desired icon

This is probably the best solution, but it's a little trickier. (See also this more thorough description for creating lightweight icon themes.)

Run this from a Terminal:

# Create a new theme containing the icon we want
mkdir -p ~/.icons/Faenza-Alan/actions/22
ln -s /usr/share/icons/Faenza-Darkest/actions/22/gtk-paste.png ~/.icons/Faenza-Alan/actions/22/.
# Copy the theme config and modify it for our new theme
cp /usr/share/icons/Faenza-Darkest/index.theme ~/.icons/Faenza-Alan/.
sed -i -e "s/Inherits=/Inherits=Faenza-Dark,/g" ~/.icons/Faenza-Alan/index.theme
sed -i -e "s/Faenza-Darkest/Faenza-Alan/g" ~/.icons/Faenza-Alan/index.theme

Now open Appearance and change your icon theme to Faenza-Alan.

Now your new theme will persist regardless of system upgrades. (Unless Faenza removes the gtk-paste.png icon. If you're worried about that, use cp instead of ln -s. But you won't get updates to the icon.)

My Faenza-Alan looks like this: Faenza-Alan's app-indicators and back/forward and the paste icon in gedit

In testing this, I see that it's probably a bug that Faenza uses a light app-indicator icon for any of the dark themes. Anyone know where you can file a bug?

Related Question