I'm writing a script to quickly list my many opened windows. I have grouped them according to their class. I would like to add an icon to the group.
I use wmctrl to get the list of windows:
wmctrl -lx | egrep -v "0x.*(0 N/A)|-1" | sort -k3
The egrep
pipe filters out background services.
the sort
of the third column groups the windows by class.
This is a sample output:
0x05a00001 0 google-chrome.Google-chrome ubunzeus (8) Newest Questions - Ask Ubuntu - Google Chrome
0x05a00028 0 google-chrome.Google-chrome ubunzeus How to get the icon of a window class? - Ask Ubuntu - Google Chrome
0x06c00010 0 Mail.Thunderbird ubunzeus Inbox - L. D. James - Mozilla Thunderbird
The window class is the third column of the output.
If I can access the icon (in this sample, google-chrome.Google-chrome
and Mail.Thunderbird
), I can associate the image with those blocks.
Does anyone know where the Ubuntu stores these images? I believe they are referred to as the mime images or something like that.