5

I am running on Arch Linux using Openbox as the window manager. I want to assign icons to some programs that are using the generic icon.

This is helpful because when I do an Alt-Tab, I will know the program based on the icon it shows. Currently, I have some programs, like Xterm and Xpdf, using the default icon and doing an Alt-Tab when both are open can be confusing.

I have Firefox, Geany and Leafpad installed and I noticed that they have icons during an Alt-Tab.

So how do I set this up for the other programs that don't?

2 Answers 2

9

If you are talking about icons in your panel (like tint2, for example), then you can use xseticon (there is a PKGBUILD in AUR).

You can set an icon for an application like so:

xseticon -id "$WINDOWID" path/to/icon.png
7
  • I am not using Tint2 or any panel for that matter. I just want to change the icon of the program when Alt-Tab is pressed. Commented Jul 16, 2011 at 11:44
  • Did you try xseticon? Did it not work? Commented Jul 16, 2011 at 19:45
  • I just tried it now. And it works! Thanks for this. Commented Jul 17, 2011 at 15:01
  • And I also noticed that when I close the window that I have assigned an icon to, and reopen it, it goes back to the default icon (and not the one I assigned). :( Commented Jul 17, 2011 at 15:13
  • 1
    if [ "$TERM" = "rxvt-unicode-256color" ]; then xseticon -id "$WINDOWID" /usr/share/pixmaps/urxvtc.png fi Commented Jul 19, 2011 at 19:55
0

As jasonwryan says, you can use xseticon to set the icon of windows. If you want to do this automatically, you can use Devil's Pie.

I created a small script that sets a window's icon based on the current GNOME icon theme (it can easily be adapted to work with KDE). Here it is.

The corresponding Devil's Pie configuration looks like:

(spawn_sync "/path/to/set-xdg-icon.sh" (str (window_xid)))

This requires xseticon, pyxdg and xprop.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.