Sunday, August 05, 2007

Fluxbox Keys

Over the past several months, I've come to appreciate KDE applications—especially Amarok, Kaffeine and Konqueror. Unfortunately, KDE eats RAM like Cookie Monster once ate cookies. (Those were the days.) So I went back to Fluxbox.

One of my biggest frustrations with Fluxbox used to be the keybindings. The default keyboard shortcuts aren't much like the ones I know from GNOME and KDE. I would often hit Alt+F4, expecting the window to close, and instead get switched to Workspace 4. Then I discovered how easy they are to customize.

The first time you log into a Fluxbox session, it creates a directory ~/.fluxbox where it stores a small handful of config files. Among them is the keys file. All you have to do is remove the bindings you don't want and replace them with your preferred set. Here's mine:

Control F1 :Workspace 1
Control F2 :Workspace 2
Control F3 :Workspace 3
Control F4 :Workspace 4
Control Mod1 Escape :KillWindow
Mod1 F1 :RootMenu
Mod1 F2 :ExecCommand fbrun
Mod1 F4 :Close
Mod1 F9 :Minimize
Mod1 F10 :MaximizeWindow
Mod1 Shift Tab :PrevWindow
Mod1 Tab :NextWindow

I struck a compromise between the GNOME and KDE defaults. Note that Mod1 is the Alt key.

So, for example, I can press Alt+F2 and get what amounts to a "Run…" dialog. Then I enter a command, like xterm, and I'm on my way. It's an particularly handy binding for those who avoid the mouse whenever possible.

More detailed info can be found in the Fluxbox Keybindings section of the docs.

No comments: