I was tired of looking at the miniicons in WindowList so hacked something together. Not really happy with how cludgy it is, but it works:
Set this at top of config:
SetEnv IconPath1 /usr/share/icons/gnome/apps/48
SetEnv IconPath2 /usr/share/icons/hicolor/scalable/apps
SetEnv IconPath3 /usr/share/icons/Humanity/apps/48
SetEnv IconPath4 /usr/share/icons/elementary/apps/47
SetEnv IconPath5 /usr/share/icons/Faenza/apps/scalable
Then later down:
[code]DestroyFunc ChangeIcon
AddToFunc ChangeIcon
- I Current PipeRead “if [ -e $[IconPath1]/$[w.resource].svg ]; then echo WindowStyle EWMHMiniIconOverride, MiniIcon $[IconPath1]/$[w.resource].svg:48x48; fi”
- I Current PipeRead “if [ -e $[IconPath2]/$[w.resource].svg ]; then echo WindowStyle EWMHMiniIconOverride, MiniIcon $[IconPath2]/$[w.resource].svg:48x48; fi”
- I Current PipeRead “if [ -e $[IconPath3]/$[w.resource].svg ]; then echo WindowStyle EWMHMiniIconOverride, MiniIcon $[IconPath3]/$[w.resource].svg:48x48; fi”
- I Current PipeRead “if [ -e $[IconPath4]/$[w.resource].svg ]; then echo WindowStyle EWMHMiniIconOverride, MiniIcon $[IconPath4]/$[w.resource].svg:48x48; fi”
- I Current PipeRead “if [ -e $[IconPath5]/$[w.resource].svg ]; then echo WindowStyle EWMHMiniIconOverride, MiniIcon $[IconPath5]/$[w.resource].svg:48x48; fi”
- I Current UpdateStyles
DestroyModuleConfig FvwmEvent: *
*FvwmEvent: add_window ChangeIcon[/code]
It basically looks in each iconpath for a svg associated with the applications resource name, then replaces the miniicon with it and updates the style.
The things I wasn’t able to get to work:
*Tried all paths in ImagePath
*Tried switching from add_window to focus_change (to persist over FVWM restarts) *but resulted in screen flickering (probably from the UpdateStyles)
*Tried applying States to updated window and then using a Current (!State 11) UpdateStyles to limit the number of updates, but that didn’t work.
Advice or ideas are appreciated