How to change the battery icon in the systray

batteryfreedesktopicons

I have installed Gnome and Awesome window manager. The window manager has a panel that displays systray icons according to the freedesktop.org System Tray Protocol Specification. I'd like to change the icon of the battery in the system tray.

systray with incorrectly themed icons for power and Parcellite

I first tried changing the icon theme; the icon in the systray does not match the icon from the selected theme, so I'm not sure where the icon is coming from. I've tried several themes in case there was a problem with the one I selected.

I've read the mentioned specification, as well as the Gnome Icon Theme Specification and the Creating icon themes for GNOME article. I've also tried using inotifywait -mr on /usr/share/icons while restarting my Gnome session and while changing the icon theme using gnome-tweak-tool. It actually does touch the battery icon in my theme, but that's not what gets displayed.

[UPDATE: the theme icon is what is being displayed, but it's rendering as black instead of the true color, which is a couple shades of gray].

I looked through every image in /usr/share/gnome-power-manager. The icon wasn't anywhere in there [UPDATE: it was – but I didn't recognize it because it's not black]. I tried hitting it with xprop, but it didn't give me anything useful, and running xprop -spy isn't showing anything when the widget is updated.

Best Answer

Your icon theme (whatever you're using) is probably inheriting another theme which is inheriting another theme etc...until it finds all the icons. Look in your theme's index.theme file and see what icon theme it inherits. Look there for the battery icon. If you dont find it there, look at what theme that inherits..etc. You'll probably find the icon after 1 or two iterations.

you can find index.theme in /usr/share/icons/[theme name]/index.theme

Related Question