Friday, June 18, 2010

Keybindings to manipulate windows Openbox

The wonderful thing about openbox is the great ease of configuring keybindings for very intense window managing. The use of the keyboard for managing windows and desktops is a very productive alternative to the use of the mouse. The level and complexity of the keybindings you will want is a very personal thing and will change all the time. This is a starter level set up which is intended just to stimulate you to start using keybindings for wm.

Activate windows or window switching

[Obkey variable mentioned between brackets, see below for more info on Obkey]

Super z Focus Next window [Obkey options Action: NextWindow; Raise AllDesktops or Desktop, linear; finalactions: Focus, Raise Unshade]
Super Alt z Tab Focus Previous window [Obkey options Action: PreviousWindow; Raise AllDesktops or Desktop, linear; finalactions: Focus, Raise Unshade]
Super Esc Unfocus, Iconofy [Obkey options Action: iconofy,unfocus]
(preferred here Super combinations because Alt combinations are often already in use by the active window app itself)
Alt F4 Close window

Super F5 ShowMenu [Obkey options Action: menu: ShowMenu client-list-combined-menu]
(shows all apps running on diverse desktops,select with up/down, enter)
Super Alt r Resize focused window [Obkey options Action: Resize edge:none]
Super Left - resizes window to half the screen then snaps it to the left [Obkey options Action: unmaximizefull, maximizevert, move resize to x=0,y=0, width:half horizontal monitor resolution 1920:2=960]
Super Right - resizes window to half the screen then snaps it to the right [Obkey options Action: unmaximizefull, maximizevert, move resize to x=960,y=960, width=960 change to half of your horizontal monitor resolution 1920:2=960]
Super F11 Maximize full, toggle [Obkey options Action:ToggleMaximizeFull]
Super F12 Iconofy
Super D Show/Hide Desktop [Obkey options Action:ToggleShowDesktop]

Moving to different workspaces and moving windows to them

Super F1 Go to Workspace 1 [Obkey options Action: Desktop desktop: 1]
Super F2 Go to Workspace2

Super Up Go to the workspace on the left [Obkey options Action: PreviousWindow]
Super Down Go to the workspace on the right [Obkey options Action: NextWindow]

Super Alt F1 Send window to workspace 1 [Obkey options Action:SendToDesktop, desktop:1 follow:yes]
Super Alt F2 Send window to workspace 2

Super Alt Left Send window to the workspace on the left [Obkey options Action:SendToDesktopLeft]
Super Alt Right Send window to the workspace on the right [Obkey options Action:SendToDesktopRight]

All above keybindings use the easy accessible super and alt keys.

When you use Pytyle; activate with Alt-a (halt it with Alt-u)
then Alt-Ctrl-C cascade windows, Alt-Ctrl-M maximize all windows,
Alt-Ctrl-h tile windows horizontal, Alt=Ctrl=v vertical.

Use Obkey to change keybindings

[For the lazy people: the first section of the keyboard part of the rc.xml with all the relevant keybindigns for manipulating windows you can find here ]

Select a keybinding, which one is not important and click on plus sign top left (insert sibling keybind); click on the new key till you see " new accelerator", press the key or keys whcih you wnat to use for that action.
Now add, action by clicking on plus sign action bottom middle right, you see as default possibility focus, click on that word and you will see a whole range of options of which you can choose by clicking an that option.
When done don't forget to save.

For explanations on the terminology:

This is a conky file to memorize the keybindings (to be placed in home/username/)

File: .conkyrc
#${color red}Manipulate Windows{color}

${color beige}Change the Active Window
Super+z$alignr Raise Nxt Wind
Super+Alt+z$alignr Raise Prev Wind
Super+Le$alignr Raise Half wind Le
Super+Ri$alignr Raise Half wind Ri
Super F9$alignr Toggle Shade
Super F10$alignr Toggle fullscreen
Super F11$alignr Toggle Max Full
Super F12$alignr Iconofy
Super+d$alignr Show Desktop
Super+Esc$alignr Unfocus and Iconofy
Super Alt+r$alignr Resize Window
${color beige}Move between Windows
Super+up$alignr Go Left Wind
Super+down$alignr Go Right Wind
Super F1$alignr Go Desktop 1
Super F5$alignr Clientlist Combined Menu
Super+d$alignr Show Desktop
${color beige}Moving Windows
Super Alt Left$alignr Send Win to WoLe
Super Alt Right$alignr Send Win to WoRi
Super Alt F1$alignr Send Win to Wo 1
Super Alt F2$alignr Send Win to Wo 2

Want to discover other options?
Download Urukrama rc.xml file by doing in terminal:

He shows a lot of options in his rc file;
see also

Epilogue: an interesting addition to keybindings are Keychains:

A keychain is pressing two keys together, lets say Ctrl and f and releasing them and pressing another key for instance s to
ToggleMaximizeFull and x to ToggleShade

If you leave Openbox in a key chain state for too long without completing it, Openbox will cancel the key chain and restore your normal key bindings.

You can also use the "C-g" (Control key and "g" key together), in the default configuration, to cancel any key chain which you are in.

No comments:

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.