I’ve got a very nice Moka+Numix icon theme which works well with my dock and Nautilus, but unfortunately Openbox wasn’t picking up on it (not surprisingly, since the icon theme is a GNOME thing). As a result, the icons in Openbox’s Alt-Tab Switcher were inconsistent with the rest of my desktop.
It turns out that Openbox was using the icon specified in the X properties of the window. This is set by the application itself. Fortunately, there’s a rather useful xseticon
script made by Paul “LeoNerd” Evans that allows for the modification of these icons. Together with Devil’s Pie, a look at the XDG Icon Theme Specifications, and small script, this allowed me to automatically set the icon for all windows, so that now everything is nice and consistent.
This requires xseticon
, python-xdg
, and xprop
, all of which are in the Debian repositories (Wheezy).
The Devil’s Pie configuration file is:
1 |
(spawn_sync "$HOME/.local/bin/set-xdg-icon" (str (window_xid))) |
Replace $HOME
with your home directory.
The ~/.local/bin/set-xdg-icon
looks like:
An error has occurred. Please try again later. |
This can certainly be adapted for use with KDE, by just using whatever analogue of gsettings
KDE has when determining the icon theme.
Note that some .desktop
files don’t have the StartupWMClass
set. In order to get the corresponding applications to work with this, you’ll need to add it with the WM_CLASS found by xprop
‘ing the appropriate window.
Here’s a Gist.