Hi, I've always wanted to override the application icons used by the
task switcher (e.g. awful.menu.clients()). That is, when I Alt-Tab
through my running windows, I like to see icons of my own choosing. I
wrote a quick hack to do this last night, which I am posting here now
in case anyone wants to suggest a better approach.

For the most part I just infer the application from the window title.
In the case of the terminal application, I have a different icon for
each window, so I change the icon using a shell command. It sets the
window title according to this little arbitrary syntax:

icon $ICON_FILENAME /icon "Visible Window Title"

(Naturally VT100 escape sequence for dynamic title setting). The
purpose of putting the icon filename in the window title is I don't
know any other way to communicate per-window settings from the shell
to capi.client.get(). Obviously this is all pretty kludgy, but if it
turns out this is a sane way to manage icons I will clean up my patch
and re-post it. Thanks!

screenshot: http://modernhacker.com/awesome/awesome-icons.png
menu.lua patch: http://modernhacker.com/awesome/icon-patch
shell code for title setting: http://modernhacker.com/awesome/prompt.sh

Attachment: icon-patch
Description: Binary data

Reply via email to