You are not logged in.

#1 2012-01-03 23:23:57

HuckleSmothered
Member
Registered: 2010-03-25
Posts: 68

Icons for lxpanel taskbar

Talking about the Task Bar (Window List) on the lxpanel. It appears that the icons do not match what is shown in the Application Launch Bar (still in the lxpanel).

Currently I'm using a specific icon set of Faenza, but this happens with all icon sets. I'm noticing the issue on the lxterminal, all libreoffice docs, clementine, thunderbird, emelfm2, keepassx, and some other unimportant ones.

My latest attempt to fix was looking for the ugly icons that I see in the Window List. I found lxterminal in /usr/share/pixmaps. emelfm2 and keepassx were in there as well. I deleted their icons and made a quick link to a Faenza icon back to pixmaps (deleting the icon just resulted in an uglier icon). However, this fixed lxterminal. But it did not fix keepassx. There are NO other keepassx icons anywhere on my computer (I did a 'find / -iname "*keepassx*"'). Similarly, there are many wrong icons that aren't even in the pixmaps folder. Like the libreoffice ones. Which I cannot find anywhere that match the ones showing in the Window List.

Which brings me to my big question; Where is the lxpanel Task Bar (Window List) pulling the icons from that it uses?

And why is this different than what it uses for the Application Launch Bar?

Offline

#2 2012-01-04 00:15:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: Icons for lxpanel taskbar

Assuming this is in LXDE and/or Openbox, the panels generally use the icon associated with the application window.  I recently was looking into ways to change this too.  I'm sure there is more than one way, but I found a solution that works wonderfully for me after a little set up: xseticon from the AUR.

I think the name of the tool makes it clear what it does.  I have some entries in my bashrc along with aliases to set the icon appropriately for common terminal apps (mutt, vim, R, vifm, etc).  This sets the icon in the app-switcher and in tint2 - I suspect it would also have the same effect in lxpanel.

Setting the icon for non-terminal apps would have to take advantage of <application> tags in openbox's rc.xml.

Again, I'm sure there are other solutions - but I have quickly fallen in love with xseticon.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-01-04 01:44:09

HuckleSmothered
Member
Registered: 2010-03-25
Posts: 68

Re: Icons for lxpanel taskbar

Indeed this is in LXDE and Openbox both.

I'll look into xseticon right now.

Can you explain a bit further into the "the panels generally use the icon associated with the application window"? I'm not sure what the "application window" would technically be or where that is specified or by what.

Offline

#4 2012-01-04 01:52:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: Icons for lxpanel taskbar

I can try...

I say generally because I have only played briefly with lxpanel.  I would not have to use the word 'generally' if you were talking about tint2 as I have more experience with it.  I am generalizing what I've learned about tint2 to apply to lxpanel.  I suspect this is a safe extrapolation - but one never knows.

Secondly, what the "application window" is or where it is specified still is confusing to me.  I suppose if I new the answer to that it would take all the 'magic' out of xseticon, wouldn't it? smile

I also searched around the file system and configuration files, but I couldn't find anything.  I learned enough to know the relevant icons (for tint2 and likely lxpanel) are set at the level of the application talking to X, not at the level of the panels or window managers, etc.  There are other types of docks / panels that set their own icons.  I tinkered very briefly with cairo-dock, which it seemed does set its own icons, so a user could configure the icons through the cairo-dock settings.

I'm sure someone here would know better than me, but for me the 'magic' of xseticon just works.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2012-01-04 01:53:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: Icons for lxpanel taskbar

I suppose if I were really curious I'd look at xseticon's code to see exactly what it does.  But given that I've got it doing what I want it to do, my curiosity is satiated.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2012-01-04 22:08:49

HuckleSmothered
Member
Registered: 2010-03-25
Posts: 68

Re: Icons for lxpanel taskbar

Thanks for the explanation. You've helped me understand it a bit better.

Been looking at xseticon. Unfortunately it doesn't stay persistent. Windows change their ID every time they close and open again. Even worse, the NAME isn't exactly helpful. For instance, Clementine's (music player) window NAME is whatever song is playing.

I thought there was an X window standard for this stuff? I would think an app would add an icon to a specific place and use that only if a different theme wasn't being used.

Maybe I'll play with Cairo dock a bit since you implied the application doesn't have a say in what icon is used. I'm assuming it would be the theme at that point.

Still boggles my mind that I literally canNOT find the matching icon of what is showing in the Window List in the pixmaps or icons folder for a few apps. Where the heck ARE they? LibreOffice for one.

Offline

#7 2012-01-04 23:55:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: Icons for lxpanel taskbar

xseticon is not persistent, that's why I had to fiddle with aliases.  This is easy enough with terminal apps, but a bit trickier with gui apps like LibreOffice.

It can be done though if, for example, you have the following

function icon-me {
    sleep 3
    ID=$(xwininfo -root -children -all | grep "$1" | sed 's/.*\(0x[0-9a-f]*\).*/\1/')
    xseticon -id $ID /usr/share/pixmaps/$2
}

alias myWriter='soffice --writer & icon-me "Writer" arch.png'

This is horribly ugly and I'm sure could be smoothed out in a number of ways.  But I just tried it out and it works nicely (assuming you have an arch.png in the listed path).  The sleep is required to make sure Writer is fully opened, and it may need to be adjusted for different systems.

Of course, if you don't want to hack together all sorts of nonsense like the above, you could get Devil's Pie which is a tool to handle just this sort of thing for you with matching rules along the lines of "if window-name is LibreOffice Writer then xseticon to some-image" in more precise xml.

Last edited by Trilby (2012-01-04 23:56:43)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB