« The wife build | Main | Mapped Network Drives, an old enemy »

Jumping to specific windows in FVWM

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

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on May 6, 2008 10:45 AM.

The previous post in this blog was The wife build.

The next post in this blog is Mapped Network Drives, an old enemy.

Many more can be found on the main index page or by looking through the archives.