SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-01-12 11:07:29

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Howto easily handle windows only by keyboard

Hi all

I'm one of those people who likes to use only the keyboard, to handle windows operations like Minimize, Maximize, Resize etc.

This is easily done in the OpenBox windows manager by modifying the file that controls it all.

~/.config/openbox/rc.xml

In this file, look for:

    <!-- Keybindings for windows -->

And insert the following below it:

Maximize and unmaximize the current window:

    <keybind key="A-F12">
     <action name="ToggleMaximizeFull"/>
    </keybind>

Minimize the current window:

    <keybind key="A-F11">
     <action name="Iconify"/>
    </keybind>

Maximize and unmaximize the current window vertically:

    <keybind key="A-F10">
      <action name="ToggleMaximizeVert"/>
    </keybind>

Maximize and unmaximize the current window horizontally:

    <keybind key="A-F9">
      <action name="ToggleMaximizeHorz"/>
    </keybind>

Shade and unshade the current window (aka rool-up):

    <keybind key="A-F8">
      <action name="ToggleShade"/>
    </keybind>

Move the current window to Center:

    <keybind key="A-m">
      <action name="MoveToCenter"/>
    </keybind>

Resize the current window:

    <keybind key="A-r">
      <action name="Resize"/>
    </keybind>

I find this very usefull and less time consuming instead of grabbing the mouse all the time smile

This is what makes OpenBox the best windowsmanager available !

For further informations take a look at this page:
http://icculus.org/openbox/index.php/He … s#ShowMenu

Last edited by Scrat (2009-01-12 11:14:59)


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

Be excellent to each other!

#2 2009-01-12 13:35:45

kestrel
Species: F. sparverius
From: Moscow, Idaho
Registered: 2008-11-29
Posts: 170
Website

Re: Howto easily handle windows only by keyboard

Niels, thanks for the tips. I love being able to do these things from the keyboard. My philosophy is, when my hands are at the keyboard I like keybindings and when my hand is on the mouse I like to be able use mouse actions. Both should work, the users should not be limited!


My web activities: Etsy Shop | Facebook | Blog

Offline

#3 2009-01-12 13:41:30

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

Exactly !! smile

and that's why Openbox is the perfect window manager !

Thanks for commenting big_smile


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#4 2009-01-12 15:26:09

DUDE
#! Member
From: Krypton?
Registered: 2008-12-16
Posts: 56

Re: Howto easily handle windows only by keyboard

Would you please share your rc.xml smile
I'm to lazy to do it myself...

Have to say this has to be extremely comfortable to have!
Keyboard > Mouse tongue


Wrapped in just a blanket I was sent here from far far away to protect the people of this world! *NOT*
Last.fm

Offline

#5 2009-01-12 15:35:42

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

Shure smile

Here you go:
(The only thing I have changed, since installing #! the day before yesterday, is, switching the keybindings for dmenu to C-space, and the stuff as described above)

Remember everything is possible with OpenBox, just ask smile

<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc">
  <resistance>
    <strength>10</strength>
    <screen_edge_strength>20</screen_edge_strength>
  </resistance>
  <focus>
    <focusNew>yes</focusNew>
    <!-- always try to focus new windows when they appear. other rules do
       apply -->
    <followMouse>no</followMouse>
    <!-- move focus to a window when you move the mouse into it -->
    <focusLast>yes</focusLast>
    <!-- focus the last used window when changing desktops, instead of the one
       under the mouse pointer. when followMouse is enabled -->
    <underMouse>no</underMouse>
    <!-- move focus under the mouse, even when the mouse is not moving -->
    <focusDelay>200</focusDelay>
    <!-- when followMouse is enabled, the mouse must be inside the window for
       this many milliseconds (1000 = 1 sec) before moving focus to it -->
    <raiseOnFocus>no</raiseOnFocus>
    <!-- when followMouse is enabled, and a window is given focus by moving the
       mouse into it, also raise the window -->
  </focus>
  <placement>
    <policy>Smart</policy>
    <!-- 'Smart' or 'UnderMouse' -->
    <center>yes</center>
    <!-- whether to place windows in the center of the free area found or
       the top left corner -->
    <monitor>Any</monitor>
  </placement>
  <theme>
    <name>CrunchBang</name>
    <titleLayout>LIMC</titleLayout>
    <!--
      avaible characters are NDSLIMC, each can occur at most once.
      N: window icon
      L: window label (AKA title).
      I: iconify
      M: maximize
      C: close
      S: shade (roll up/down)
      D: omnipresent (on all desktops).
  -->
    <keepBorder>yes</keepBorder>
    <animateIconify>yes</animateIconify>
    <font place="ActiveWindow">
      <name>sans</name>
      <size>8</size>
      <!-- font size in points -->
      <weight>bold</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="InactiveWindow">
      <name>sans</name>
      <size>8</size>
      <!-- font size in points -->
      <weight>bold</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuHeader">
      <name>sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuItem">
      <name>sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>normal</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="OnScreenDisplay">
      <name>sans</name>
      <size>9</size>
      <!-- font size in points -->
      <weight>bold</weight>
      <!-- 'bold' or 'normal' -->
      <slant>normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
  </theme>
  <desktops>
    <!-- this stuff is only used at startup, pagers allow you to change them
       during a session

       these are default values to use when other ones are not already set
       by other applications, or saved in your session

       use obconf if you want to change these without having to log out
       and back in -->
    <number>2</number>
    <firstdesk>1</firstdesk>
    <names>
      <name>Desktop 1</name>
      <name>Desktop 2</name>
    </names>
    <popupTime>875</popupTime>
    <!-- The number of milliseconds to show the popup for when switching
       desktops.  Set this to 0 to disable the popup. -->
  </desktops>
  <resize>
    <drawContents>yes</drawContents>
    <popupShow>Nonpixel</popupShow>
    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
    <popupPosition>Center</popupPosition>
    <!-- 'Center' or 'Top' -->
    <popupFixedPosition>
      <x>0</x>
      <y>0</y>
    </popupFixedPosition>
  </resize>
  <!-- You can reserve a portion of your screen where windows will not cover when
     they are maximized, or when they are initially placed.
     Many programs reserve space automatically, but you can use this in other
     cases. -->
  <margins>
    <top>1</top>
    <bottom>0</bottom>
    <left>0</left>
    <right>0</right>
  </margins>
  <dock>
    <position>TopLeft</position>
    <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
    <floatingX>0</floatingX>
    <floatingY>0</floatingY>
    <noStrut>no</noStrut>
    <stacking>Above</stacking>
    <!-- 'Above', 'Normal', or 'Below' -->
    <direction>Vertical</direction>
    <!-- 'Vertical' or 'Horizontal' -->
    <autoHide>no</autoHide>
    <hideDelay>300</hideDelay>
    <!-- in milliseconds (1000 = 1 second) -->
    <showDelay>300</showDelay>
    <!-- in milliseconds (1000 = 1 second) -->
    <moveButton>Middle</moveButton>
    <!-- 'Left', 'Middle', 'Right' -->
  </dock>
  <keyboard>
    <chainQuitKey>C-g</chainQuitKey>
    <!-- Keybindings for desktop switching -->
    <keybind key="C-A-Left">
      <action name="DesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-A-Right">
      <action name="DesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-A-Up">
      <action name="DesktopUp">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="C-A-Down">
      <action name="DesktopDown">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Left">
      <action name="SendToDesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Right">
      <action name="SendToDesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Up">
      <action name="SendToDesktopUp">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="S-A-Down">
      <action name="SendToDesktopDown">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="W-F1">
      <action name="Desktop">
        <desktop>1</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-d">
      <action name="ToggleShowDesktop"/>
    </keybind>
    <!-- Keybindings for windows -->
    <keybind key="A-F12">
     <action name="ToggleMaximizeFull"/>
    </keybind>
    <keybind key="A-F11">
     <action name="Iconify"/>
    </keybind>
    <keybind key="A-F10">
      <action name="ToggleMaximizeVert"/>
    </keybind>
    <keybind key="A-F9">
      <action name="ToggleMaximizeHorz"/>
    </keybind>
    <keybind key="A-F8">
      <action name="ToggleShade"/>
    </keybind>
    <keybind key="A-m">
      <action name="MoveToCenter"/>
    </keybind>
    <keybind key="A-r">
      <action name="Resize"/>
    </keybind>
      <keybind key="A-F4">
      <action name="Close"/>
    </keybind>
    <keybind key="A-Escape">
      <action name="Lower"/>
      <action name="FocusToBottom"/>
      <action name="Unfocus"/>
    </keybind>
    <keybind key="A-space">
      <action name="ShowMenu">
        <menu>client-menu</menu>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <execute>scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; gpicview ~/images/$f'</execute>
      </action>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <execute>scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/images/ &amp; gpicview ~/images/$f'</execute>
      </action>
    </keybind>
    <!-- Keybindings for window switching -->
    <keybind key="A-Tab">
      <action name="NextWindow"/>
    </keybind>
    <keybind key="A-S-Tab">
      <action name="PreviousWindow"/>
    </keybind>
    <keybind key="C-A-Tab">
      <action name="NextWindow">
        <panels>yes</panels>
        <desktop>yes</desktop>
      </action>
    </keybind>
    <!-- Keybindings for running applications -->
    <keybind key="A-F2">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Run Program</name>
        </startupnotify>
        <command>gmrun</command>
      </action>
    </keybind>
    <keybind key="C-space">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>dmenu-bind</name>
        </startupnotify>
        <command>~/.config/dmenu/dmenu-bind.sh</command>
      </action>
    </keybind>
    <keybind key="W-f">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Thunar</name>
        </startupnotify>
        <command>thunar</command>
      </action>
    </keybind>
    <keybind key="W-t">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Terminal</name>
        </startupnotify>
        <command>terminator</command>
      </action>
    </keybind>
    <keybind key="W-w">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Web Browser</name>
        </startupnotify>
        <command>firefox</command>
      </action>
    </keybind>
    <keybind key="W-l">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Lock screen</name>
        </startupnotify>
        <command>gnome-screensaver-command -l</command>
      </action>
    </keybind>
    <keybind key="W-e">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Editor</name>
        </startupnotify>
        <command>gedit</command>
      </action>
    </keybind>
    <keybind key="W-m">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>MP3 player</name>
        </startupnotify>
        <command>listen</command>
      </action>
    </keybind>
    <keybind key="W-v">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>xfce4-mixer</name>
        </startupnotify>
        <command>xfce4-mixer</command>
      </action>
    </keybind>
    <keybind key="W-g">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Gimp</name>
        </startupnotify>
        <command>gimp</command>
      </action>
    </keybind>
    <keybind key="W-x">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Logout</name>
        </startupnotify>
        <command>/usr/bin/openbox-logout</command>
      </action>
    </keybind>
    <keybind key="W-space">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>
    <keybind key="A-C-q">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>
  </keyboard>
  <mouse>
    <dragThreshold>8</dragThreshold>
    <!-- number of pixels the mouse must move before a drag begins -->
    <doubleClickTime>200</doubleClickTime>
    <!-- in milliseconds (1000 = 1 second) -->
    <screenEdgeWarpTime>400</screenEdgeWarpTime>
    <!-- Time before changing desktops when the pointer touches the edge of the
       screen while moving a window, in milliseconds (1000 = 1 second).
       Set this to 0 to disable warping -->
    <context name="Frame">
      <mousebind button="A-Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="A-Left" action="Click">
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="A-Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="A-Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="A-Right" action="Drag">
        <action name="Resize"/>
      </mousebind>
      <mousebind button="A-Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="C-A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="C-A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-S-Up" action="Click">
        <action name="SendToDesktopPrevious"/>
      </mousebind>
      <mousebind button="A-S-Down" action="Click">
        <action name="SendToDesktopNext"/>
      </mousebind>
    </context>
    <context name="Titlebar">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Move"/>
      </mousebind>
      <mousebind button="Left" action="DoubleClick">
        <action name="ToggleMaximizeFull"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="Up" action="Click">
        <action name="Shade"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
        <action name="Lower"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="Unshade"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="Top">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>top</edge>
        </action>
      </mousebind>
    </context>
    <context name="Left">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>left</edge>
        </action>
      </mousebind>
    </context>
    <context name="Right">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>right</edge>
        </action>
      </mousebind>
    </context>
    <context name="Bottom">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize">
          <edge>bottom</edge>
        </action>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Lower"/>
        <action name="FocusToBottom"/>
        <action name="Unfocus"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="BLCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="BRCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TLCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="TRCorner">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize"/>
      </mousebind>
    </context>
    <context name="Client">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Icon">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="ShowMenu">
          <menu>client-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="AllDesktops">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleOmnipresent"/>
      </mousebind>
    </context>
    <context name="Shade">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleShade"/>
      </mousebind>
    </context>
    <context name="Iconify">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="Iconify"/>
      </mousebind>
    </context>
    <context name="Maximize">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="ToggleMaximizeFull"/>
      </mousebind>
      <mousebind button="Middle" action="Click">
        <action name="ToggleMaximizeVert"/>
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ToggleMaximizeHorz"/>
      </mousebind>
    </context>
    <context name="Close">
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </mousebind>
      <mousebind button="Left" action="Click">
        <action name="Close"/>
      </mousebind>
    </context>
    <context name="Desktop">
      <mousebind button="Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="C-A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="C-A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="Left" action="Press">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Root">
      <!-- Menus -->
      <mousebind button="Middle" action="Press">
        <action name="ShowMenu">
          <menu>client-list-combined-menu</menu>
        </action>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="ShowMenu">
          <menu>root-menu</menu>
        </action>
      </mousebind>
    </context>
    <context name="MoveResize">
      <mousebind button="Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
      <mousebind button="A-Up" action="Click">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind button="A-Down" action="Click">
        <action name="DesktopNext"/>
      </mousebind>
    </context>
  </mouse>
  <menu>
    <!-- You can specify more than one menu file in here and they are all loaded,
       just don't make menu ids clash or, well, it'll be kind of pointless -->
    <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
    <!-- system menu files on Debian systems 
    <file>/var/lib/openbox/debian-menu.xml</file>
    <file>debian-menu.xml</file> -->
    <file>menu.xml</file>
    <hideDelay>200</hideDelay>
    <middle>no</middle>
    <submenuShowDelay>100</submenuShowDelay>
    <applicationIcons>yes</applicationIcons>
  </menu>
  <applications>
    <!--
  # this is an example with comments through out. use these to make your
  # own rules, but without the comments of course.

  <application name="first element of window's WM_CLASS property (see xprop)"
              class="second element of window's WM_CLASS property (see xprop)"
               role="the window's WM_WINDOW_ROLE property (see xprop)">
  # the name or the class can be set, or both. this is used to match
  # windows when they appear. role can optionally be set as well, to
  # further restrict your matches.

  # the name, class, and role use simple wildcard matching such as those
  # used by a shell. you can use * to match any characters and ? to match
  # any single character.

  # when multiple rules match a window, they will all be applied, in the
  # order that they appear in this list


    # each element can be left out or set to 'default' to specify to not 
    # change that attribute of the window

    <decor>yes</decor>
    # enable or disable window decorations

    <shade>no</shade>
    # make the window shaded when it appears, or not

    <position>
      # the position is only used if both an x and y coordinate are provided
      # (and not set to 'default')
      <x>center</x>
      # a number like 50, or 'center' to center on screen. use a negative number
      # to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
      # right edge (or bottom).
      <y>200</y>
      <monitor>1</monitor>
      # specifies the monitor in a xinerama setup.
      # 1 is the first head, or 'mouse' for wherever the mouse is
    </position>

    <focus>yes</focus>
    # if the window should try be given focus when it appears. if this is set
    # to yes it doesn't guarantee the window will be given focus. some
    # restrictions may apply, but Openbox will try to

    <desktop>1</desktop>
    # 1 is the first desktop, 'all' for all desktops

    <layer>normal</layer>
    # 'above', 'normal', or 'below'

    <iconic>no</iconic>
    # make the window iconified when it appears, or not

    <skip_pager>no</skip_pager>
    # asks to not be shown in pagers

    <skip_taskbar>no</skip_taskbar>
    # asks to not be shown in taskbars. window cycling actions will also
    # skip past such windows

    <fullscreen>yes</fullscreen>
    # make the window in fullscreen mode when it appears

    <maximized>true</maximized>
    # 'Horizontal', 'Vertical' or boolean (yes/no)
  </application>

  # end of the example
-->
    <application name="gmessage">
      <decor>no</decor>
      <shade>no</shade>
      <skip_pager>yes</skip_pager>
      <skip_taskbar>yes</skip_taskbar>
      <fullscreen>no</fullscreen>
      <maximized>no</maximized>
    </application>
  </applications>
</openbox_config>

/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#6 2009-01-12 15:46:02

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

Scrat wrote:

Remember everything is possible with OpenBox, just ask smile

Except making coffee off course !! big_smile


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#7 2009-01-12 16:06:02

DUDE
#! Member
From: Krypton?
Registered: 2008-12-16
Posts: 56

Re: Howto easily handle windows only by keyboard

Thanks man! smile
Love my new keybindings!

But what is this...?
Coffee?! Damn thats a surprise!


Wrapped in just a blanket I was sent here from far far away to protect the people of this world! *NOT*
Last.fm

Offline

#8 2009-01-12 16:09:00

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

lol


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#9 2009-01-12 16:23:55

Nik_Doof
#! Junkie
Registered: 2008-12-13
Posts: 361
Website

Re: Howto easily handle windows only by keyboard

Ahh thanks for the handy hints, good stuff for my EeePC smile

Offline

#10 2009-01-14 23:06:18

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 443

Re: Howto easily handle windows only by keyboard

@Scrat this is was a very helpful post, thanks.

I've got a question: does anyone know how I can either know how I can get M-d to minimize and restore everything or better yet what action / existing key binding can be used to restore everything?

Here's the unexpected behavior I've observed.  The Meta-d command shows me my desktop (expected) and then when I do it again restores all of my windows to their previous states (or so it seems).  If I try to click on one of my apps that has been minimized to the taskbar (iconified to the panel, is that the openbox lingo?) it doesn't spring back to life.  The only way to get it back is to do M-d again.  Unless I open another window, which I do most of the time, in which case I'm able to click on, and re-display, anything that M-d minimized the first time.  This is a little bit annoying, feels like a bug.

Now with my new window open I hit M-d again anything I've opened is minimized, as before.  But, this time when I do M-d to bring everything back I just get back the things that the previous M-d command minimized, not anything that was M-d away before.
For example: open firefox and a terminal <M-d> i'm looking at my desktop, open gedit <M-d> i'm looking at my desktop <M-d> i'm looking at my gedit, but not firefox or my terminal.  This behavior seems halfway between a bug and a design decision.   I'm hoping it's a decision and I'm just overlooking the restore all action in the docs.

For anyone else new to openbox I found this guide helpful


FHSM: avoid vowels and exotic consonants and you'll get your handle every time.  identi.ca

Offline

#11 2009-01-15 07:23:06

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

@ fhsm:
I'm not sure if it is a feature or a bug smile

I've noticed this too. But as I see it is certainly not as Openbox feature, but rather a LXPanel problem.


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#12 2009-01-15 12:12:22

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 443

Re: Howto easily handle windows only by keyboard

Scrat wrote:

I've noticed this too. But as I see it is certainly not as Openbox feature, but rather a LXPanel problem.

I'm afraid I'm going to need that one explained.  I'm still quite wet behind the ears on where the different components start and stop.

Still looking for any tips on the "restore all" keyboard action?


FHSM: avoid vowels and exotic consonants and you'll get your handle every time.  identi.ca

Offline

#13 2009-01-15 12:24:25

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

Have you tried this ??
Open ~/.config/openbox/rc.xml in your editor.

Search for this line:

<!-- Keybindings for windows -->

and insert the following below:

<keybind key="A-d">
  <action name="ToggleShowDesktop"/>
</keybind>

Last edited by Scrat (2009-01-15 12:32:18)


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#14 2009-01-15 12:46:16

Aughban
#! Member
From: Southampton, UK
Registered: 2008-12-30
Posts: 76
Website

Re: Howto easily handle windows only by keyboard

another great howto smile

Offline

#15 2009-01-15 13:40:20

Scrat
#! CrunchBanger
From: Denmark
Registered: 2009-01-10
Posts: 164

Re: Howto easily handle windows only by keyboard

Aughban wrote:

another great howto smile

Thanks smile


/Niels
Registered Linux user #133791 > Get counted at http://counter.li.org
-----------------------------------------------------------------------
So Many Things To Do, And No Time For Nuts !

Offline

#16 2009-01-15 18:51:38

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 443

Re: Howto easily handle windows only by keyboard

Scrat wrote:

and insert the following below:

<keybind key="A-d">
  <action name="ToggleShowDesktop"/>
</keybind>

That's the out of the box action that I referenced in my original post.  Mine is just mapped to M-d instead.  But thanks for the suggestion.


FHSM: avoid vowels and exotic consonants and you'll get your handle every time.  identi.ca

Offline

#17 2009-01-20 17:21:24

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: Howto easily handle windows only by keyboard

fhsm wrote:
Scrat wrote:

and insert the following below:

<keybind key="A-d">
  <action name="ToggleShowDesktop"/>
</keybind>

That's the out of the box action that I referenced in my original post.  Mine is just mapped to M-d instead.  But thanks for the suggestion.

It's toggling show desktop. It isn't toggling restore/iconify all. And pypanel's handling of windows, imho, is terrible (for just this sort of behavior). If you really want to have a keybinding that does this you could write something using wmctrl (it lets you send commands to openbox, and once you learn the syntax it lets you have a lot of control over things). I used it on a little project I posted on the old forums, and it was really neat how much you could do.

Offline

#18 2009-02-07 01:11:15

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: Howto easily handle windows only by keyboard

Scrat wrote:

Shure smile

Here you go:
(The only thing I have changed, since installing #! the day before yesterday, is, switching the keybindings for dmenu to C-space, and the stuff as described above)

Remember everything is possible with OpenBox, just ask smile

Thank for the wonderful changes.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#19 2010-12-17 12:55:30

frogdos
Member
From: scotland
Registered: 2010-01-23
Posts: 20

Re: Howto easily handle windows only by keyboard

thanx for the maximize/minimize tips, Scrat. #! and it's users are the best out there. imho natch. big_smile


Wake up and smell the sheep dip, folks

Offline

#20 2013-04-29 15:30:28

babouk
#! CrunchBanger
From: #!_de
Registered: 2009-08-10
Posts: 106
Website

Re: Howto easily handle windows only by keyboard

I just added keybindings to openbox - according to my liking ...

<!-- Keybindings for windows my own resize etc. -->
<!-- thread:  http://crunchbang.org/forums/viewtopic.php?id=563 -->
    <keybind key="W-m">
     <action name="ToggleMaximizeFull"/>
    </keybind>
    <keybind key="M-s">
      <action name="ToggleShade"/>
    </keybind>
    <keybind key="W-c">
      <action name="MoveToCenter"/>
    </keybind>
    <keybind key="W-f">
     <action name="ToggleFullScreen"/>
    </keybind>
    <keybind key="M-d">
      <action name="ToggleShowDesktop"/>
    </keybind>

Thanks a lot for the tutorial
cool

There is one question left ...
I would like to set a keybinding for restarting openbox + reconfigure openbox

I tried to set "restart"
to a keybinding, which did not do it
Does anybody have an idea?

Last edited by babouk (2013-04-29 15:31:28)


waldorf | openbox
pekwm

Offline

#21 2013-04-29 17:14:48

douglas
#! CrunchBanger
From: Dallas, Texas
Registered: 2011-01-09
Posts: 223

Re: Howto easily handle windows only by keyboard

Thanks guys!

Offline

#22 2013-04-29 23:41:10

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,905

Re: Howto easily handle windows only by keyboard

babouk wrote:

I would like to set a keybinding for restarting openbox + reconfigure openbox

I tried to set "restart"
to a keybinding, which did not do it
Does anybody have an idea?

Try capitalizing the first letter so Restart. For reconfigure, did you try <action name="Reconfigure" />?

Alternatively you can just create keybinds that launch "openbox --reconfigure" and "openbox --restart".


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#23 2013-04-30 03:00:05

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 743

Re: Howto easily handle windows only by keyboard

babouk wrote:

I just added keybindings to openbox - according to my liking ...

There is one question left ...
I would like to set a keybinding for restarting openbox + reconfigure openbox

I tried to set "restart"
to a keybinding, which did not do it
Does anybody have an idea?

Restart and Exit

    <keybind key="W-q">
      <action name="Restart"/>
    </keybind>
    <keybind key="W-S-q">
      <action name="Exit">
        <prompt>yes</prompt>
      </action>
    </keybind>

"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#24 2013-04-30 12:48:44

babouk
#! CrunchBanger
From: #!_de
Registered: 2009-08-10
Posts: 106
Website

Re: Howto easily handle windows only by keyboard

thank you anonymous & thank you PackRat !
Now it works ...
smile

Last edited by babouk (2013-04-30 12:49:25)


waldorf | openbox
pekwm

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo