Fluxbox Configuration

About

Fluxbox is a small blackbox based WindowManager. Unlike Openbox, which is super-minimalistic, it has some features included:

  • Application runner (fbrun)
  • Application bar with tray support
  • Window-Matching tool
  • Keyboard shortcuts

Configuration

First you need a good style, for exampe this one. Extract it to your ~/.fluxbox/styles/ directory, and set it up with the fluxbox menu. Then you may want to have all your applications in your menu. Run fluxbox-generate_menu for that.

Window Matching & Tabs

If you want fluxbox to remember the window positions of your applications, you can do this with the window menu entry Remember settings or by editing the  ~/.fluxbox/apps file.

[startup]         {conky}
 
[app] (name=fbrun)
  [Position]    (CENTER)        {0 0}
  [Layer]       {2}
[end]
 
[group]  (workspace=[current])
  [app] (name=xterm) (class=XTerm)
[end]

The fbrun-entry is default. This apps-file will automaticly start conky and tab all xterms of one workspace in one window (yes it will tab them - try it out and you will see, what I'm talking about).

Keyboard shortcuts

For the shortcut configuration you have to edit the ~/.fluxbox/keys file. This one will set up the following shortcuts:

  • Ctrl + Alt + D: View/Hide Desktop
  • Alt + Left-Mouse: Move Window
  • Alt + Right-Mouse: Resize Window
  • Middle-Mouse on Window-bar: Drag into other windows to tab them
  • Special + 1, 2, n: Open this tab
  • Special + ScrUP/ScrDOWN: Change tab
  • Alt + Tab: Change Window
  • Double-Click on window-bar: Maximize
  • Alt + F1: open xterm
  • Alt + F2: open Application launcher
  • Ctrl + Alt + L: Lock Screen (xlock required)
  • Ctrl + Alt + Esc: Start XKill
  • Special + "/", "*" or "-": reduce, increase or toggle volume
  • Alt + F4/F9/F10: Close/Minimize/Maximize Window
  • Alt + F11: Fullscreen
  • Special + F1, F2, Fn: Change Workspace
  • Special + Shift + F1, F2, Fn: Send window to workspace
# click on the desktop to get menus
OnDesktop Mouse1 :HideMenus
OnDesktop Mouse2 :WorkspaceMenu
OnDesktop Mouse3 :RootMenu
 
#show desktop
Control Mod1 D :ShowDesktop
 
# scroll on the desktop to change workspaces
OnDesktop Mouse4 :PrevWorkspace
OnDesktop Mouse5 :NextWorkspace
 
# scroll on the toolbar to change workspaces
OnToolbar Mouse4 :PrevWorkspace
OnToolbar Mouse5 :NextWorkspace
 
# alt + left/right click to move/resize a window
OnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
OnWindow Mod1 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}
 
# middle click a window's titlebar and drag to attach windows
OnTitlebar Mouse2 :StartTabbing
 
# double click on the titlebar to -shade- minimize
OnTitlebar Double Mouse1 :Maximize #:Shade
 
# right click on the titlebar for a menu of options
OnTitlebar Mouse3 :WindowMenu
 
# alt-tab
Mod1 Tab :NextWindow {groups}
Mod1 Shift Tab :PrevWindow {groups}
 
# cycle through tabs in the current window
Mod4 Tab :NextTab
Mod4 Shift Tab :PrevTab
 
# go to a specific tab in the current window
Mod4 1 :Tab 1
Mod4 2 :Tab 2
Mod4 3 :Tab 3
Mod4 4 :Tab 4
Mod4 5 :Tab 5
Mod4 6 :Tab 6
Mod4 7 :Tab 7
Mod4 8 :Tab 8
Mod4 9 :Tab 9
Mod4 Prior :PrevTab
Mod4 Next :NextTab
 
# open a terminal
Mod1 F1 :Exec xterm
 
# open a dialog to run programs
Mod1 F2 :Exec fbrun
 
# open a dialog to "KILL defenceless applications"
Control Mod1 Escape :Exec xkill
# open a dialog to "KILL defenceless applications"
Control Mod1 L :Exec xlock
 
# volume settings, using common keycodes
# if these don't work, use xev to find out your real keycodes
Mod4 63 :Exec amixer sset Master,0 1+
Mod4 112 :Exec amixer sset Master,0 1-
Mod4 82 :Exec amixer sset Master,0 toggle
 
# current window commands
Mod1 F4 :Close
Mod1 F9 :Minimize
Mod1 F10 :Maximize
Mod1 F11 :Fullscreen
 
# open the window menu
Mod1 space :WindowMenu
 
# exit fluxbox
Control Mod1 Delete :Exit
 
# change to a specific workspace
Mod4 F1 :Workspace 1
Mod4 F2 :Workspace 2
Mod4 F3 :Workspace 3
Mod4 F4 :Workspace 4
Mod4 F5 :Workspace 5
Mod4 F6 :Workspace 6
Mod4 F7 :Workspace 7
Mod4 F8 :Workspace 8
Mod4 F9 :Workspace 9
Mod4 F10 :Workspace 10
Mod4 F11 :Workspace 11
Mod4 F12 :Workspace 12
 
# send the current window to a specific workspace
Mod4 Shift F1 :SendToWorkspace 1
Mod4 Shift F2 :SendToWorkspace 2
Mod4 Shift F3 :SendToWorkspace 3
Mod4 Shift F4 :SendToWorkspace 4
Mod4 Shift F5 :SendToWorkspace 5
Mod4 Shift F6 :SendToWorkspace 6
Mod4 Shift F7 :SendToWorkspace 7
Mod4 Shift F8 :SendToWorkspace 8
Mod4 Shift F9 :SendToWorkspace 9
Mod4 Shift F10 :SendToWorkspace 10
Mod4 Shift F11 :SendToWorkspace 11
Mod4 Shift F12 :SendToWorkspace 12
 
## send the current window and change to a specific workspace
#Control Mod4 F1 :TakeToWorkspace 1
#Control Mod4 F2 :TakeToWorkspace 2
#Control Mod4 F3 :TakeToWorkspace 3
#Control Mod4 F4 :TakeToWorkspace 4
#Control Mod4 F5 :TakeToWorkspace 5
#Control Mod4 F6 :TakeToWorkspace 6
#Control Mod4 F7 :TakeToWorkspace 7
#Control Mod4 F8 :TakeToWorkspace 8
#Control Mod4 F9 :TakeToWorkspace 9
#Control Mod4 F10 :TakeToWorkspace 10
#Control Mod4 F11 :TakeToWorkspace 11
#Control Mod4 F12 :TakeToWorkspace 12 

Tags: