Tastenkombinationen für Fluxbox einrichten

Fluxbox ist ein beliebter Window-Manager und ein Konkurrent zum bekannten KDE oder Gnome. Fluxbox ist klein, schlank, schnell und wird hauptsächlich über Textdateien konfiguriert.

So ist es möglich, über die Datei ~/.fluxbox/keys Tastenkombinationen festzulegen, damit man Anwendungen und Skripte bequem über die Tastatur ausführen kann. Nach der Installation von Fluxbox kann man standardmäßig mit "ALT" + "F1" bis "F12" die Arbeitsflächen wechseln. Dieses sind nichts anderes als Tastenkombinationen, welche in der Datei ~/.fluxbox/keys festgelegt wurden.

Einrichten der Tastenkombinationen

Die Syntax der Datei ~/.fluxbox/keys ist relativ einfach und das Einrichten von Tastenkombinationen sollte keine große Probleme bereiten. Mod 1 steht für die ALT-Taste und Mod 4 für die umgangsprachlich genannte Windows-Taste. Für die STRG- und SHIFT-Taste stehen die Synonyme CONTROL und SHIFT.

Folgendes Beispiel verdeutlicht die Syntax der Datei ~/.fluxbox/keys

# Fenster wechseln
# Mod1 = Alt
Mod1 Tab :NextWindow
Mod1 Shift Tab :PrevWindow

# Arbeitsflächen wechseln
# Mod1 = Alt
Mod1 F1 :Workspace 1
Mod1 F2 :Workspace 2
Mod1 F3 :Workspace 3
Mod1 F4 :Workspace 4
Mod1 F5 :Workspace 5
Mod1 F6 :Workspace 6
Mod1 F7 :Workspace 7
Mod1 F8 :Workspace 8
Mod1 F9 :Workspace 9
Mod1 F10 :Workspace 10
Mod1 F11 :Workspace 11
Mod1 F12 :ExecCommand sudo halt

# Fenster schließen/minimieren
# Ctrl = Strg
Mod1 k :Close
Mod1 m :Minimize

# Anwendungen starten
# Mod4 = "Windows Taste"
Mod4 g :ExecCommand gimp
Mod4 t :ExecCommand thunderbird
Mod4 f :ExecCommand firefox
Mod4 o :ExecCommand ooffice2
Mod4 a :ExecCommand aterm -sl 1000 -bg black -fg white
Mod4 c :ExecCommand gaim

Und zur Verdeutlichung noch ein weiteres Beispiel von www.gentoo.org:

# locks X11 display to the current user
Mod4 l   :ExecCommand xlock

# opens a number of programs with quickkeys. These are just examples, I am sure
# you get the point...
Mod1 f   :ExecCommand firefox
Mod1 t   :ExecCommand thunderbird
Mod1 o   :ExecCommand oowriter
Mod1 v   :ExecCommand gvim

# Fluxbox has no sound control, so we need to do a hack to get one
# (assumes alsa usage. if you use oss, then you are on your own)
Mod1 e   :ExecCommand Eterm -name alsa -e alsamixer

# This launches fbrun, which in turn launches other programs
Mod1 r   :ExecCommand fbrun

# Program Control. It just makes life simpler...
Mod1 4   :Close
Mod1 m   :Minimize

# if you have aterm (emerge x11-terms/aterm), then this opens a really nice
# transparent aterm with no borders, fitting nicely with 1024x768
# resolution, while still leaving room for conky. Once again, feel free to
# modify.
Mod1 a   :ExecCommand aterm -name aterm -sl 3000 -tr +sb -sr -sk -bg black -fg \
white -fade 90 -bl -tn xterm -fn \
-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-15 -g 116x57

# similar to the above, but opens a transparent rooted terminal. you must, of
# course, know the root password to use this
Mod1 s   :ExecCommand aterm -name aterm -sl 3000 -tr +sb -sr -sk -bg black -fg \
white -fade 90 -bl -tn xterm -fn \
-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-15 -g 116x57 -e su -

Das ist eigentlich auch schon alles. Viel Spaß beim Einrichten Eurer individuellen Tastenkürzel in Fluxbox!