I had another surge of motivation to switch back to FVWM, so I’m hacking away at my .fvwm2rc again.

One particularly useful trick I’ve come up with is to be able to map key combinations to focus specific application windows. This works even if I’m looking at a different desk. As I tend to only ever have one firefox window open, it’s extremely handy to just be able to jump to it from anywhere.

DestroyFunc RaiseAndFocus
AddToFunc RaiseAndFocus
+ I Focus
+ I Raise
# Function to focus firefox if a window exists, otherwise launch firefox.
# firefox32 is my custom wrapper to run 32 bit firefox on a
# x64 machine.
DestroyFunc FocusOrExecFirefox
AddToFunc FocusOrExecFirefox
+ I Next (Firefox) RaiseAndFocus
+ I TestRc (NoMatch) Exec exec firefox32
# Jump to specific applications. "4" is the modifier for the windows key.
Key f A 4 FocusOrExecFirefox
Key x A 4 Next (xterm, CurrentGlobalPage) RaiseAndFocus
# Jump to pidgin's chat window (not the buddy list window)
Key c A 4 Next (pidgin, !"Buddy List") RaiseAndFocus
Key v A 4 Next (vmware) RaiseAndFocus

Leave a comment

Your email address will not be published. Required fields are marked *