You are not logged in.

#1 2011-10-27 16:23:01

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 3,617
Website

Keybindings to manipulate windows in Openbox

Saved with Google cache from the old forum @archbang.47.forumer.com :original post by pablokal » Sat Jun 19, 2010
Search it with: site:archbang.47.forumer.com

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 (window management).


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.

Howto Use Obkey to change keybindings

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 on that option. When done, don't forget to save.

For explanations see also: http://openbox.org/wiki/Help:Actions#Window_actions

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

File: .conkyrc

    TEXT
    #${color red}Manipulate Windows{color}

    SHORTCUT KEYS:
    ${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


Use Obkey to change keybindings

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 which you want 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 on that option. When done, don't forget to save.

More here: http://stillstup.blogspot.com/2010/06/k … ndows.html



  Part of my keybindings part of /home/user/.config/openbox/rc.xml

<keybind key="S-A-Left">
      <action name="SendToDesktopLeft">
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Right">
      <action name="SendToDesktopRight">
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Up">
      <action name="SendToDesktopUp">
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Down">
      <action name="SendToDesktopDown">
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="W-F1">
      <action name="Desktop"/>
    </keybind>
    <keybind key="A-W-F1">
      <action name="SendToDesktop"/>
    </keybind>
    <keybind key="A-W-F2">
      <action name="SendToDesktop">
        <desktop>2</desktop>
      </action>
    </keybind>
    <keybind key="W-F2">
      <action name="Desktop">
        <desktop>2</desktop>
      </action>
    </keybind>
    <keybind key="W-F3">
      <action name="Desktop">
        <desktop>3</desktop>
      </action>
    </keybind>
    <keybind key="W-F4">
      <action name="Desktop">
        <desktop>4</desktop>
      </action>
    </keybind>
    <keybind key="W-Left">
      <action name="UnmaximizeFull"/>
      <action name="MaximizeVert"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>960</width>
      </action>
    </keybind>
    <keybind key="W-Right">
      <action name="UnmaximizeFull"/>
      <action name="MaximizeVert"/>
      <action name="MoveResizeTo">
        <x>960</x>
        <y>960</y>
        <width>960</width>
      </action>
    </keybind>
    <keybind key="W-d">
      <action name="ToggleShowDesktop"/>
    </keybind>
    <keybind key="A-F4">
      <action name="Close"/>
    </keybind>
    <keybind key="W-F11">
      <action name="ToggleMaximizeFull"/>
    </keybind>
    <keybind key="W-F12">
      <action name="Iconify"/>
    </keybind>
    <keybind key="A-W-Left">
      <action name="SendToDesktopLeft"/>
    </keybind>
    <keybind key="A-W-Right">
      <action name="SendToDesktopRight"/>
    </keybind>
    <keybind key="W-F9">
      <action name="ToggleShade"/>
    </keybind>
    <keybind key="W-F10">
      <action name="ToggleFullscreen"/>
    </keybind>
    <keybind key="W-F7">
      <action name="ToggleDecorations"/>
    </keybind>
    <keybind key="W-F8">
      <action name="FocusToBottom"/>
    </keybind>
    <keybind key="A-S-d">
      <action name="ToggleDecorations"/>
    </keybind>
    <keybind key="W-F5">
      <action name="ShowMenu">
        <menu>client-list-combined-menu</menu>
      </action>
    </keybind>
    <keybind key="A-W-r">
      <action name="Resize"/>
    </keybind>
    <keybind key="W-z">
      <action name="NextWindow">
        <dialog>no</dialog>
        <bar>no</bar>
        <raise>yes</raise>
        <allDesktops>yes</allDesktops>
        <linear>yes</linear>
      </action>
    </keybind>
    <keybind key="A-W-z">
      <action name="PreviousWindow">
        <dialog>no</dialog>
        <bar>no</bar>
        <raise>yes</raise>
        <allDesktops>yes</allDesktops>
        <linear>yes</linear>
      </action>
    </keybind>
    <keybind key="A-Escape">
      <action name="Lower"/>
      <action name="Iconify"/>
      <action name="Unfocus"/>
    </keybind>
    <keybind key="S-Escape">
      <action name="Unfocus"/>
    </keybind>
    <keybind key="W-Escape">
      <action name="Iconify"/>
      <action name="Unfocus"/>
    </keybind>
    <keybind key="A-space">
      <action name="ShowMenu">
        <menu>client-menu</menu>
      </action>
    </keybind>
    <keybind key="W-Down">
      <action name="NextWindow">
        <dialog>no</dialog>
        <bar>no</bar>
        <raise>yes</raise>
        <allDesktops>yes</allDesktops>
        <linear>yes</linear>
      </action>
    </keybind>
    <keybind key="W-Up">
      <action name="PreviousWindow">
        <dialog>no</dialog>
        <bar>no</bar>
        <raise>yes</raise>
        <allDesktops>yes</allDesktops>
        <linear>yes</linear>
      </action>
    </keybind>
    <keybind key="W-A-z">
      <action name="Unfocus"/>
    </keybind>
    <keybind key="W-A-space">
      <action name="ToggleAlwaysOnTop"/>
    </keybind>

Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

Board footer

Powered by FluxBB