My Openbox keybindings
July 22, 2008
One of Openbox’ great strengths is that you can control every aspect of the window manager with your keyboard, provided you spend some time configuring your keybindings. Since I use my computer extensively to process text, I have configured Openbox such that I only need to use the mouse when I really want to, and don’t have to move away from the keyboard. It speeds things up considerably, once you are used to it!
Below I give all the keybindings I use in Openbox. Some of these keybindings I don’t use very regularly. The ones that I use extensively are those that launch applications (Win+F1-9 to launch applications, or Alt+F1-6 to launch menus or application launchers); those that control the volume (Ctrl-Up/Down) and mpc (Ctrl-Alt + other keys); those to switch windows (Alt-Tab and Win-Tab) or to switch workspace (Ctrl-Alt-Left/Right); those for basic window actions, such as close (Win-A-C), maximize (Win-A-M), iconify (Win-A-I), send to bottom (Win-A-B), etc; those to move windows in the current workspace (Win + some direction key); to move windows to the next workspace (Win-A-N) or previous workspace (Win-A-P); or to follow windows to the next (Win-A-Shift-N) or previous workspace (Win-A-Shift-P).
When I mention “(with osdsh)”, it means that the action that is performed is shown on screen with osdsh. Thus, when I reconfigure Openbox, the message “reconfiguring” on my screen, or when I turn the volume up it says “volume up”. (I know osdsh has a mixer display, but that uses a lot of CPU in Hardy!). When I mention “(with script)” in the launcher section, I launch a script to raise the application if it is already running or to open a new instance if it isn’t. The shutdown and logout keybindings (Win-O-S and Win-O-E) launch a gmessage script that gives me the option to reboot, shutdown, logout, or lock the screen.
As you will see below, I make extensive use of keychains. Keychains are great! They enable me to keep most of my keybindings fairly simple and straightforward: Win-A starts the keychain for window actions (thus ‘Win-A + C’ closes the focused window, and ‘Win-A + N moves it to the next workspace); Win-O governs all the Openbox related actions (Reconfiguring, editing the configuration files, etc.).
I have also posted my current rc.xml file, for those interested. I’m pretty sure there are some additional keybindings in that file (probably duplicate actions) that are not mentioned below; if that is the case they are keybindings I no longer use, but forgot to remove.
######################### ## Launchers and Menus ## ######################### Alt F1 root menu Alt F2 gmrun Alt F3 dmenu Alt F5 dmenu for configuration files Alt F6 client-combined-list Win F1 mousepad Win F2 notecase Win F3 xfce4-terminal (script) Win F4 thunar (script) Win F5 gmpc Win F6 epiphany Win F7 ooffice writer Win F8 opera (script) Win F9 stardict Win F10 gedit Win F11 gnome-alsamixer Win F12 Lock screen (xlock) Ctrl Alt Del htop ######### ## MPD ## ######### Ctrl Alt space mpc toggle (with osdsh) Ctlr Alt Prior mpc next (with osdsh) Ctlr Alt Next mpc previous (with osdsh) #################### ## Volume control ## #################### Ctrl Up Volume up (PMC) (with osdsh) Ctrl Down Volume down (PMC) (with osdsh) Ctrl Shift Up Volume up (Master) (with osdsh) Ctrl Shift Down Volume down (Master) (with osdsh) Ctrl Alt End Volume mute (with osdsh) #################### ## Window actions ## #################### Win a Window actions m Toggle maximize full v Toggle maximize vertical h Toggle maximize horizontal i Iconify c Close s Toggle Shade t Toggle always on top b Send to bottom Shift b Toggle always below Shift l Send to normal layer Shift d Toggle omnipresent d Toggle decorations l Lower, focus to bottom, unfocus p Send to previous workspace n Send to next workspace Shift p Follow to previous workspace Shift n Follow to next workspace g GrowTo Left GrowToEdgeWest Right GrowToEdgeEast Down GrowToEdgeSouth Up GrowToEdgeNorth Win space Show client-menu ############# ## Openbox ## ############# Win o Openbox actions r Reconfigure (with osdsh) c Edit rc.xml m Edit menu.xml s Shutdown (gmessage) e Exit/logout (gmessage) l Lock screen (xlock) ############### ## Worspaces ## ############### Ctrl Alt Left Go to the workspace on the left Ctrl Alt Right Go to the workspace on the right Alt Shift Left Send window to the workspace on the left Alt Shift Right Send window to the workspace on the right Win Shift F1 Send window to workspace 1 Win Shift F2 Send window to workspace 2 Win Shift F3 Send window to workspace 3 Win d Show desktop ###################### ## Window switching ## ###################### Alt Tab Next window Alt Shift Tab Previous window Win Tab Next window (all desktops) Win Shift Tab Previous window (all desktops) ################## ## Move Windows ## ################## Win Left Move window left Win Right Move window right Win Down Move window down Win Up Move window up Win Prior Move window to top right corner Win Next Move window to bottom right corner Win Home Move window to top left corner Win End Move window to bottom left corner #################### ## Resize Windows ## #################### Alt Left Increase left edge Alt Right Increase right edge Alt Up Increase top edge Alt Down Increase bottom edge Alt Shift Left Decrease right edge Alt Shift Right Decrease left edge Alt Shift Up Decrease bottom edge Alt Shift Down Decrease top edge Alt F12 Toggle fullscreen Ctrl Alt d Toggle autohide dock
Just when i found how to reduce volume with mpc…
Good timing !
Even if i’m not keen on keybindings (except for the sound when there is no applet existing) i think that your list is a good example of what is possible.
Thanks you for everything.
What are the Prior and Next keys on your rc file?
I was trying to bind mocp commands to “Home, Insert, Page up, down” just like in winamp. But I dont know how to call them on the file ^^
Forget what I ask, already found out =p
Hey, this was excellent!
Your guide to openbox is an *incredible* resource, thank you!
I’ve added this to a page at the crunchbang linux wiki, hopefully it stays there. =)
http://crunchbanglinux.org/wiki/howto/edit_keyboard_shortcuts
[…] Zustände haben können, teilweise sogar kombiniert: minimiert, maximiert, geschlossen, horizontal maximiert, vertikal maximiert, aufgerollt und/oder auf allen Desktops. Klingt erstmal umständlich, aber wenn man eine Weile […]
Link to rc.xml is no longer working, can you fix it, please?
[…] have these actions bound to a keychain, beginning with Win + a (which I use for all my window actions), followed by the number of the numeric keypad that corresponds to the place I want the window to […]
[…] the Win+o+h keychain (auto)hide the xfce4-panel and Win+o+Shift+h make the panel visible again. (In my configuration, W-o starts the keychain for all Openbox and DE related […]
almost 6 years later and this post is still muchos helpful! I love keybindings but never have enough time to play around as much as I would like. Some of these have already been added to my rc.xml.
thanks a lot!
Thank you, very useful!
Can you please reupload your rc.xml? Seems to be offline:
“An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.”
Here it s:
http://web.archive.org/web/20141016104356/http://dotfiles.org/~urukrama/rc.xml_07-2008
I have dual screens, sometimes a game will open fullscreen on the wrong monitor, can a keybind simply move it to the other (DFP-0) ?