Here are the keybindings I use for window management. As I use FVWM, they are written in FVWM syntax, but you should be able to understand them even if you are not using FVWM. You can easily test a keybinding by entering the line in question into the FVWM Console.

Please keep in mind that these keybindings are the ones that work for me. The best keybindings for you may depend on you way of work, type of keyboard and your preferences.

The syntax of an FVWM keybinding instruction is:

Key <Keyname> <Context> <Modifiers> <Function>

Context is where the binding is active (A for All), and the Modifiers may be N (None), A (All), S (Shift), M (Meta/Alt), C (Control), 4 (Winkey) and 5 (Alt Gr).

Window switching

First, I want to be able to switch between windows quickly:

Key K A 5		Prev (CurrentPage, AcceptsFocus, !Iconic) FocusRaiseFunc
Key J A 5		Next (CurrentPage, AcceptsFocus, !Iconic) FocusRaiseFunc

Alt Gr-K changes between the last two open windows, and Alt Gr-J cycles through all of them. Unlike standard Alt-Tab behaviour, you don’t have to release the modifier key to focus the window, making your system far more responsive.

As a supplement, I also use some kind of Alt-Tab behaviour, except that I use different bindings for distinct classes of windows.

Key Tab A M 		ShowClassList
Key Tab A 4 		ShowOtherList
Key Tab A C 		ShowIconList

As I got a lot of open terminals, I prefer to split it up, so that Alt-Tab switches between terminal emulators, and Winkey-Tab for the others. Minimized windows is restored by Control-Tab. In that way they won’t disturb. See the implementation of the functions.

Windows movement

Window Packing moves the window a given direction until it hits something. It was implemented by Tavis Ormandy and is well described here.

Key A			WT1246 5	PackWrapperLeft
Key D			WT1246 5	PackWrapperRight
Key W			WT1246 5	PackWrapperUp
Key S			WT1246 5	PackWrapperDown

Shift for smaller step movements:

Key A			WT1246 5S	Move w-50p w+0
Key D			WT1246 5S	Move w+50p w+0
Key W			WT1246 5S	Move w+0 w-50p
Key S			WT1246 5S	Move w+0 w+50p

When I work with a window, I like to center it. It is good for the ergonomics, as I can look straight ahead. When I am finished with the window, I usually pack it into a corner.

Key V WT1246 5		CenterFunc

Actually, I rarely use these three operations:

Key H WT1246 5		Iconify
Key G WT1246 5		WindowShade
Key M WT1246 5		Maximize

Instead, when I want to get a window out of the way, I put it on an empty desktop/workspace (see MoveToDescFunc below). This way, I keep only the relevant information on the screen.

If you have a big window, lowering it is often more handy than switching between the others to find the right one:

Key R WT1246 5		Raise
Key F WT1246 5		Lower

Always on top is handy when a window should be used for reference (instructions, etc.):

Key Z WT1246 5		Layer 0 6
Key X WT1246 5		Layer 0 4

The window operations menu contains function like FvwmIdent, Sticky and Destroy, which I only use occasionally.

Key E WT1246 5		Menu MenuWindowOps Interior 0 0

To redistribute the windows on the screen:

Key Leftbracket A 5	All (CurrentDesk, !Iconic, \
			AcceptsFocus, CirculateHit) PlaceAgain \
			Anim

Application launching is done from a menu which I will cover in a later post. On the danish keyboard, the

  • Facebook
  • Twitter
  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon

Related posts:

  1. Is FVWM for you?
  2. Fvwm config of August 2008
  3. Directory Listing in FVWM menus using GNU find
  4. Mice are for cats…