SyntaxHighlighter

2013-06-12

Gnome Extensions - Change Icon for Trash Extension from bertoldia

One of the greatest things about Linux is that you can tweak almost every aspect of it, including the GUI.  For users of Gnome, the Gnome Extensions (extensions.gnome.org) add many customization options without having to get our hands dirty editing code.

One that I find exceptionally handy is the Trash extension by Axel von Bertoldi.  In Gnome 3.2 the icon looked like it does to the right, which worked out quite well for the themes and icons I regularly use in Gnome.  And changing the icon on your panel is relatively easy.

Recently I upgraded to a Fedora 18, which uses Gnome 3.6, and after replacing Nautilus with Nemo, I started installing the various Gnome extensions I use regularly.  When I got to the Trash extension by Bertoldia [here] I saw this:


The phrase "One of these things is not like the other" immediately popped to mind.  It seemed that the extension was using the trash icon from the Azenis Icons I had installed.

With a little poking around my system* I found the icon I was looking for.

To change it, all you need to do is go to your home directory (and hit ctrl-H to show hidden files/folders) then navigate to:
~/.local/share/gnome-theme/extension/gnome-shell-trash-extension/

And edit the extension.js file.  Around line 62 [view file on github] you will see the following:
PanelMenu.SystemStatusButton.prototype._init.call(this, 'user-trash');

Just replace 'user-trash' with 'user-trash-symbolic', save the file, then press alt+F2, type in r and hit enter (which forces Gnome to reload without having to log out/in).



And there it is, an icon that fits in with the others that I have on my panel.

If you would prefer to use the trash full icon from the icon set you have installed (the extension defaults to the empty image) you can instead replace the text with 'user-trash-full'.
* The path for the Gnome default trash icon is located at /usr/share/icons/gnome/scalable/places/user-trash-symbolic.svg

No comments:

Post a Comment