Where does FVWM find icons for applications in WindowList?

Problems with decorations or key/mouse bindings? Or perhaps you have a cool mouse/key binding you want to share.
frankspace
Kitten
Kitten
Posts: 2
Joined: Sat Dec 16, 2017 7:21 pm

Where does FVWM find icons for applications in WindowList?

Postby frankspace » Sat Dec 16, 2017 8:47 pm

I have a program (KEditBookmarks, if it matters) that doesn't ship with an icon, but I want to have an icon display for it in the list of windows in the WindowList popup.

I created an icon (KEditBookmarks.png) and put a copy in both /usr/share/icons and /usr/share/pixmaps. I edited the .desktop file to specify "Icon=KEditBookmarks.png", which works for that, and changed the "NoDisplay" key to "false". But I can't get FVWM to notice. I also tried changing the "Name" key in the .desktop file from "Bookmark Editor" to "KEditBookmarks" to match the icon name, and that didn't help. Obviously, I've run update-desktop-database, logged out, and logged back in again.

I've exhaused my Google skills looking for some hint at where FVWM might look to find such an icon. I even tried looking at the source code, but I really don't know what I'm looking for there. I've studied the freedesktop Desktop Entry Specification and Icon Theme Specification documentation, but if the answer was in there, I didn't understand it. Obviously, I may be searching for the wrong question, but I'm afraid I'm stumped.

Could anyone please give me a hint about how FVWM finds and uses icons for the WindowList popup and how I can get it to use an icon for a particular application? Thank you!

phleagol
Cat in the hat
Cat in the hat
Posts: 50
Joined: Sun Nov 24, 2013 1:19 pm
Location: New Zealand

Re: Where does FVWM find icons for applications in WindowList?

Postby phleagol » Sat Dec 16, 2017 9:54 pm

frankspace wrote:Could anyone please give me a hint about how FVWM finds and uses icons for the WindowList popup and how I can get it to use an icon for a particular application? Thank you!

The WindowList menu uses MiniIcons. Some programs have an inbuilt ewmh icon, which is used by default. Or you can explicitly declare you own miniicon.

First, make sure KEditBookmarks.png is in your ImagePath. If you store KEditBookmarks.png in ~/.fvwm/images, then your declared ImagePath might be...

Code: Select all

ImagePath +:/usr/share/icons
ImagePath +:/usr/share/pixmaps
ImagePath +:/usr/include/X11/bitmaps/
ImagePath +:$[FVWM_USERDIR]/images

Then declare a Miniicon style for KEditBookmarks, something like...

Code: Select all

Style KEditBookmarks MiniIcon KEditBookmarks.png

Where I have assumed "KEditBookmarks" will match with the class name of your window. Lastly, if KEditBookmarks already has an EWMH icon and you want to override it, then you might write...

Code: Select all

Style KEditBookmarks EWMHMiniIconOverride, EWMHDonateMiniIcon, MiniIcon KEditBookmarks.png


Hope that helps...

frankspace
Kitten
Kitten
Posts: 2
Joined: Sat Dec 16, 2017 7:21 pm

Re: Where does FVWM find icons for applications in WindowList?

Postby frankspace » Tue Dec 19, 2017 4:10 am

Success! That was immensely helpful, thank you! KDE has some weird naming conventions, but I was able to use the xprop utility to learn the proper window class name ("keditbookmarks" even though the window title calls itself "Bookmark Editor"). That was the hardest bit, and it was only hard because using xprop didn't occur to me until I hurled a bunch of trial-and-error guesses at it, duh. I knew FVWM can do anything. Again, thank you very much.

somiaj
Administrator
Administrator
Posts: 56
Joined: Mon Nov 08, 2004 9:54 pm
Location: Idaho (USA)
Contact:

Re: Where does FVWM find icons for applications in WindowList?

Postby somiaj » Tue Dec 19, 2017 4:26 am

frankspace wrote:KDE has some weird naming conventions, but I was able to use the xprop utility to learn the proper window class name ("keditbookmarks" even though the window title calls itself "Bookmark Editor").


You can also use the module FvwmIdent to figure out info like that about windows.
-jaimos


Return to “Decorations and bindings”

Who is online

Users browsing this forum: No registered users and 1 guest