Firefox Favicon as MiniIcon or Fuction to change MiniIcon

Hey all. I’ve created a great desktop with FVWM. I’m having a bit of trouble doing the following:

  1. Make Firefox use the favicon as the MiniIcon (titlebar and FVWMIconMan as taskbar) Not even sure if this is possible, couldn’t find a way so…
  2. I tried to create a function that would change the MiniIcon when the WM_NAME changed to “Gmail*” for example.

I didn’t notice that when the window is first mapped it’s named “Mozilla Firefox”, and I couldn’t find a way to change that. But once it changes to contain Gmail, I have a style:

Style “Gmail” EWMHMiniIconOverride, MiniIcon /absolute/path/to/my/icon/gmail.png

And it’s not getting applied when the window title changes.

Is there a way to force the MiniIcon to update to match already defined Styles if the title bar changes without writing outside perl scripts or FVWMScripts? I’ve tried doing it just after launch with WindowStyle/UpdateStyles like this:

DetroyFunc LaunchEmail
AddToFunc LaunchEmail

  • I Exec exec firefox mail.google.com &
  • I Wait (“Firefox”)
  • I Next (“Firefox”) WindowStyle EWMHMiniIconOverride, MiniIcon /absolute/path/to/icon/email.png
  • I UpdateStyles

It launches the window just fine, but won’t update the icon. Any help is appreciated. Thanks in advance to all.

Jason

There isn’t — but you can specify an icon to use in the titlebar via the MultiPixmap option as in:

MultiPixmap LeftOfText foo.png

The miniIcon of what?

[code]DestroyModuleConfig FE:*
*FE: visible_name SomeFunc

AddToFunc StartFunction I Module FvwmEvent FE

DestroyFunc SomeFunc
AddToFunc SomeFunc

  • I ThisWindow (SomeName) WindowStyle …
  • I UpdateStyles
    [/code]

Everything else you’ve tried will fail of course. See above.

– Thomas Adam

Thanks Thomas. My goal was to have the MiniIcon for a given window (I have the titlebar using the MiniIcon, and the FVWMIconMan using it as well) change after the window is mapped. I specified an Icon using the for the titlebar successfully using the style command, but couldn’t get it to change when the text (derrived from WM_NAME I imagine) in the titlebar changed.

Interestingly, I have several Styles defined like this:

Style “Gmail*” EWMHMiniIconOverride, MiniIcon /home/jason/Downloads/Cocuette/24x24/mail.png
Style “Google Calendar*” EWMHMiniIconOverride, MiniIcon /home/jason/Downloads/Cocuette/24x24/calendar.png

They are not working on new windows to change the MiniIcon. However if a window that matches the wild card is already up when I restart FVWM, then the MiniIcon in both the titlebar and and FVWMIconMan do pick up the style, and thus change the icon. I imagine this is happening because when I launch Firefox with my function below, the wildcards don’t match the first moment it is mapped because X is saying the program name is “Mozilla Firefox” until a page is actually loaded. Is there a way to make it wait 5 seconds to check the style (once Gmail is loaded)? Or is there a way to change the Style based on the change in the titlebar text?

Thanks again for any help. I started from scratch, and have a very capable DE using FVWM. Man pages are amazing. I’m just stuck on this one thing, pulling my leg hair out. :wink:

Unfortunately, you’re misusing so much X11 jargon that I am having problems separating it from your question – that I understand the jargon is even more confusing to me. Just be precise, would you?

I’ve written a long article about how FVWM applies styles lines – please go search for it either on here or google.

But I’ve already given you the answer, FFS, in my previous post. Look:

DestroyModuleConfig FE:*
*FE: visible_name SomeFunc

AddToFunc StartFunction I Module FvwmEvent FE

DestroyFunc SomeFunc
AddToFunc   SomeFunc
+ I ThisWindow (SomeName) WindowStyle .....
+ I UpdateStyles

Which bit of that can’t you fill in for yourself?

– Thomas Adam

Doh! I read your reply on a mobile device and somehow it cut off the code you graciously offered. I feel pretty dumb. I’ll give that a shot, I know you are a busy guy. Thanks again.

Worked like a charm. Among other things I wasn’t adding my FVWMEvent functions to the StartFunction. Thanks again for your insight.