I would like for inactive windows that title buttons are inactive.
ButtonStyle 1 Active Pixmap arrow-activeup.png
ButtonStyle 2 Active Pixmap close-activeup.png
ButtonStyle 4 Active Pixmap maximize-activeup.png
ButtonStyle 6 Active Pixmap iconify-activeup.png
You can do this a few ways. What you’re after is use of the “!Button x” style. So…
*FE-ButtonShuffle: Cmd Function
*FE-ButtonShuffle: focus_change AddRemoveButton
+ I All (!Focused, CurrentPage) WindowStyle !Button 1, !Button 3
+ I Current WindowStyle Button 1, Button 3
Module FvwmEvent FE-ButtonShuffle
There’s other ways you could do this as well. The above approach is messy. since it will create a slight flicker, and the “All” command performs its operation on windows that have already had the window style applied. It does, of course, depend entirely upon the point at which you decide you want to implement this (i.e., if there were any existing windows open then you would have to use All).
You could do that, or use the HasTitle patch I wrote for FVWM which would work inside conditional commands.
The better approach to this (which then would make this apply to only two windows at a time), is to set a default style such as this:
Style * !Buttons x, !Buttons y
Which assumes that all windows created won’t have which ever buttons you want to define. That’s OK, since unless you’re using something like ‘GrabFocus’ the windows won’t be receiving focus unless you ask for it, in which case:
*FE-ShowHideButtons: Cmd Function
*FE-ShowHideButtons: focus_change ReStyleWindows
+ I Current WindowStyle Button x, Button y
+ I Prev (AcceptsFocus, !Focused) WindowsStyle !Button x, !Button y
So you see how this now reduces the need to hit other windows which we don’t need to? No flicker, too.