[openbox] an alternative to underMouse, was: Re: [openbox] MoveToEdge loses focus in 3.4.4

Brian de Alwis bsd at cs.ubc.ca
Thu Aug 23 17:43:08 EDT 2007


On 2007.08.23 17:13:57 -0400, Dana Jansens wrote:
> I am actually unable to reproduce this with Firefox or Eclipse with
> the Activate binding in 3.4.4 with that patch applied.  Am I doing
> something wrong?

Well I'm completely puzzled.  Just tried it again, and it always
happens.  You have <underMouse>yes</underMouse>, right?

I've attached my rc.xml using the Activates.

I'm running:

  * NetBSD-current (4.99.28)
  * XFree86 4.5.0
  * Openbox 3.4.4 from pkgsrc with your focus_oddity.patch and my
    refocus.patch; pkgsrc includes two other patches but they only
    change build paths

Brian.

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
      "Amusement to an observing mind is study." - Benjamin Disraeli
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8"?>

<!-- Do not edit this file, it will be overwritten on install.
        Copy the file to $HOME/.config/openbox/ instead. -->

<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>yes</followMouse>
  <!-- move focus to a window when you move the mouse into it -->
  <focusLast>no</focusLast>
  <!-- focus the last used window when changing desktops, instead of the one
       under the mouse pointer. when followMouse is enabled -->
  <underMouse>yes</underMouse>
  <!-- move focus under the mouse, even when the mouse is not moving -->
    <!-- set to no as shading or moving a window that was occluding
        another will transfer focus to the occluded window. -->
  <focusDelay>0</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>no</center>
</placement>

<theme>
  <name>abs_opus_os</name>
  <titleLayout>NLIMC</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>no</animateIconify>
  <font place="ActiveWindow">
    <name>sans</name>
    <size>7</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>7</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>7</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>7</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>7</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>5</number>
  <firstdesk>1</firstdesk>
  <names>
    <!-- set names up here if you want to, like this:
    <name>desktop 1</name>
    <name>desktop 2</name>
    -->
  </names>
</desktops>

<resize>
  <drawContents>yes</drawContents>
  <popupShow>Nonpixel</popupShow>
  <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
  <popupPosition>Center</popupPosition>
  <!-- 'Center' or 'Top' -->
</resize>

<dock>
  <position>TopRight</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 running applications -->
  <keybind key="W-e">
    <action name="Execute">
      <startupnotify>
        <enabled>true</enabled>
        <name>Konqueror</name>
      </startupnotify>
      <execute>kfmclient openProfile filemanagement</execute>
    </action>
  </keybind>

  <keybind key="W-1">
    <action name="Desktop"><desktop>1</desktop></action>
  </keybind>
  <keybind key="W-2">
    <action name="Desktop"><desktop>2</desktop></action>
  </keybind>
  <keybind key="W-3">
    <action name="Desktop"><desktop>3</desktop></action>
  </keybind>
  <keybind key="W-4">
    <action name="Desktop"><desktop>4</desktop></action>
  </keybind>
  <keybind key="W-5">
    <action name="Desktop"><desktop>5</desktop></action>
  </keybind>

  <keybind key="W-S-1">
    <action name="SendToDesktop"><desktop>1</desktop></action>
  </keybind>
  <keybind key="W-S-2">
    <action name="SendToDesktop"><desktop>2</desktop></action>
  </keybind>
  <keybind key="W-S-3">
    <action name="SendToDesktop"><desktop>3</desktop></action>
  </keybind>
  <keybind key="W-S-4">
    <action name="SendToDesktop"><desktop>4</desktop></action>
  </keybind>
  <keybind key="W-S-5">
    <action name="SendToDesktop"><desktop>5</desktop></action>
  </keybind>
  <keybind key="W-C-S-1">
    <action name="SendToDesktop"><desktop>1</desktop><follow>no</follow></action>
  </keybind>
  <keybind key="W-C-S-2">
    <action name="SendToDesktop"><desktop>2</desktop><follow>no</follow></action>
  </keybind>
  <keybind key="W-C-S-3">
    <action name="SendToDesktop"><desktop>3</desktop><follow>no</follow></action>
  </keybind>
  <keybind key="W-C-S-4">
    <action name="SendToDesktop"><desktop>4</desktop><follow>no</follow></action>
  </keybind>
  <keybind key="W-C-S-5">
    <action name="SendToDesktop"><desktop>5</desktop><follow>no</follow></action>
  </keybind>

  <keybind key="W-C-1">
    <action name="Execute"><execute>xresize 600 400</execute></action>
    </keybind>
  <keybind key="W-C-2">
    <action name="Execute"><execute>xresize 600 600</execute></action>
    </keybind>
  <keybind key="W-C-3">
    <action name="Execute"><execute>xresize 600 800</execute></action>
    </keybind>
  <keybind key="W-C-4">
    <action name="Execute"><execute>xresize 768 1024</execute></action>
    </keybind>

  <keybind key="W-C-Left"><action name="ResizeRelative">
    <left>+5</left></action></keybind>
  <keybind key="W-C-Right"><action name="ResizeRelative">
    <right>+5</right></action></keybind>
  <keybind key="W-C-Up"><action name="ResizeRelative">
    <up>+5</up></action></keybind>
  <keybind key="W-C-Down"><action name="ResizeRelative">
    <down>+5</down></action></keybind>

  <!-- note the reversed sense between the key and the actual direction -->
  <keybind key="W-C-S-Left"><action name="ResizeRelative">
    <right>-5</right></action></keybind>
  <keybind key="W-C-S-Right"><action name="ResizeRelative">
    <left>-5</left></action></keybind>
  <keybind key="W-C-S-Up"><action name="ResizeRelative">
    <down>-5</down></action></keybind>
  <keybind key="W-C-S-Down"><action name="ResizeRelative">
    <up>-5</up></action></keybind>

  <keybind key="W-C-A-Delete"> <!-- turn off display -->
    <action name="Execute">
    <execute>sh -c 'sleep 1; xset dpms force off'</execute></action></keybind>

  <keybind key="W-Insert"> <!-- copy YY/MM/DD date into primary selection -->
    <action name="Execute">
    <execute>sh -c 'date +"%Y/%m/%d" | tr -d "\012" | xclip -i -selection primary'</execute></action></keybind>
  <keybind key="W-S-Insert"> <!-- copy long-form date into primary selection -->
    <action name="Execute">
    <execute>sh -c 'date +"%A, %B %e, %Y" | tr -d "\012" | xclip -i -selection primary'</execute></action></keybind>
  <keybind key="W-C-Insert"> <!-- store IP address(es) in primary selection -->
    <action name="Execute"><execute>sh -c 'myips | tr -d "\012" | xclip -i -selection primary'</execute></action></keybind>

  <keybind key="W-A-f">	<!-- reflow primary selection -->
    <action name="Execute"><execute>xflowselection</execute></action></keybind>
  <keybind key="W-A-c">	<!-- swap primary selection and clipboard -->
    <action name="Execute"><execute>xswapselcb</execute></action></keybind>


  <keybind key="W-Left">
    <action name="MoveToEdgeWest"/>
    <action name="Activate"/>
  </keybind>
  <keybind key="W-Right">
    <action name="MoveToEdgeEast"/>
    <action name="Activate"/>
  </keybind>
  <keybind key="W-Up">
    <action name="MoveToEdgeNorth"/>
    <action name="Activate"/>
  </keybind>
  <keybind key="W-Down">
    <action name="MoveToEdgeSouth"/>
    <action name="Activate"/>
  </keybind>

  <keybind key="W-S-Left">
    <action name="GrowToEdgeWest"/>
  </keybind>
  <keybind key="W-S-Right">
    <action name="GrowToEdgeEast"/>
  </keybind>
  <keybind key="W-S-Up">
    <action name="GrowToEdgeNorth"/>
  </keybind>
  <keybind key="W-S-Down">
    <action name="GrowToEdgeSouth"/>
  </keybind>

  <keybind key="W-Tab"><action name="NextWindow"/></keybind>
  <keybind key="W-S-Tab"><action name="PreviousWindow"/></keybind>
<!-- doesn't work as intended: once the button is released, then the
    current window was the previous window; could make dependent on W-
     but then there's no difference between W-Tab
  <keybind key="XF86Back"><action name="NextWindow"/></keybind>
  <keybind key="XF86Forward"><action name="PreviousWindow"/></keybind>
-->
  <keybind key="W-C-Tab"><action name="DesktopLast"/></keybind>
  <keybind key="W-Prior"><action name="DesktopPrevious"/></keybind>
  <keybind key="W-Next"><action name="DesktopNext"/></keybind>

  <keybind key="W-space"> <!-- show client menu for current window -->
    <action name="ShowMenu"><menu>client-menu</menu></action> </keybind>
  <keybind key="C-W-space"> <!-- toggle window always-on-top state -->
    <action name="ToggleAlwaysOnTop"/></keybind>
  <keybind key="A-W-space"> <!-- show pTimeTracker -->
    <action name="Execute">
    <execute>sh -c 'wmctrl -xR Ptimetracker || exec ptimetracker'</execute></action></keybind>
  <keybind key="C-A-W-space"> <!-- switch to next multi-head screen -->
    <action name="Execute">
    <execute>switchscreen</execute></action></keybind>
  <keybind key="S-W-space"> <!-- start or reset xtimer -->
    <action name="Execute">
    <execute>sh -c 'xtimer start || xtimer'</execute></action></keybind>

  <keybind key="W-BackSpace"><action name="Execute">
    <execute>mplayer-remote seek -5</execute></action></keybind>
  <keybind key="W-S-BackSpace"><action name="Execute">
    <execute>mplayer-remote pause</execute></action></keybind>

  <keybind key="W-comma"><action name="Execute">
    <execute>gqmpeg --back</execute></action></keybind>
  <keybind key="W-period"><action name="Execute">
    <execute>gqmpeg --next</execute></action></keybind>
  <keybind key="W-slash"><action name="Execute">
    <execute>gqmpeg --play</execute></action></keybind>

  <keybind key="XF86AudioPrev"><action name="Execute">
    <execute>gqmpeg --back</execute></action></keybind>
  <keybind key="XF86AudioNext"><action name="Execute">
    <execute>gqmpeg --next</execute></action></keybind>
  <keybind key="XF86AudioPlay"><action name="Execute">
    <execute>gqmpeg --play</execute></action></keybind>
  <keybind key="XF86AudioStop"><action name="Execute">
    <execute>gqmpeg --stop</execute></action></keybind>

  <keybind key="W-apostrophe"><action name="Execute">
    <execute>dbus-local purple-remote "yahoo:goim?screenname=cherylwiramanaden"</execute></action></keybind>
  <keybind key="W-S-apostrophe"> <!-- open pidgin buddy list -->
    <action name="Execute">
	<!-- try wmctrl first to bring to current desktop: purple-send
	    will cause a desktop switch should the blist be visible on
	    another desktop -->
    <execute>sh -c "wmctrl -xR Pidgin || dbus-local purple-send PurpleBlistSetVisible int32:1"</execute></action></keybind>

  <keybind key="W-F1"> <!-- raise/lower current window -->
    <action name="RaiseLower" />
  </keybind>
  <keybind key="W-F2"> <!-- iconify current window -->
    <action name="Iconify"/></keybind>
  <keybind key="W-F3"> <!-- vertical zoom for current window -->
    <action name="ToggleMaximizeVert"/></keybind>
  <keybind key="W-S-F3"> <!-- horizontal zoom for current window -->
    <action name="ToggleMaximizeHorz"/></keybind>
  <keybind key="W-F4"> <!-- close current window -->
    <action name="Close"/></keybind>
  <!--  <keybind key="A-F4"><action name="Close"/></keybind>  -->
  <keybind key="W-F5"> <!-- increase sound volume -->
    <action name="Execute">
    <execute>aumix -v+4</execute></action></keybind>
  <keybind key="W-F6"> <!-- decrease sound volume -->
    <action name="Execute">
    <execute>aumix -v-4</execute></action></keybind>
  <keybind key="W-S-F5"> <!-- show aumix controller -->
    <action name="Execute">
    <execute>sh -c 'xaumix || aumix'</execute></action></keybind>
  <keybind key="W-S-F6"> <!-- mute volume -->
    <action name="Execute">
    <execute>mute</execute></action></keybind>

<!--
  <keybind key="W-F7"><action name="Move"/></keybind>
  <keybind key="W-F8"><action name="Resize"/></keybind>
-->
  <keybind key="W-F11"> <!-- start gnumeric -->
    <action name="Execute">
    <execute>gnumeric</execute></action></keybind>
  <keybind key="W-F12"> <!-- toggle current window decorations -->
    <action name="ToggleDecorations"/></keybind>

<!-- Useful mappings on small keyboards
  <keybind key="Pause">
    <action name="RaiseLower"/>
    <action name="Unfocus"/>
  </keybind>
  <keybind key="S-Pause"><action name="Iconify"/></keybind>
  <keybind key="Scroll_Lock"><action name="Execute">
    <execute>openurl /home/bsd/public_html/index.html</execute></action></keybind>
  <keybind key="A-Scroll_Lock"><action name="Execute">
    <execute>openurl -c</execute></action></keybind>

  <keybind key="Print"><action name="ToggleMaximizeVert"/></keybind>
  <keybind key="S-Print"><action name="ToggleMaximizeHorz"/></keybind>
-->


  <keybind key="W-a"><action name="Execute">
    <execute>xalarm</execute></action></keybind>
  <keybind key="W-S-a"><action name="Execute">
    <execute>wmctrl -R xclock</execute></action></keybind>

  <keybind key="W-b"><action name="Execute">
    <execute>sh -c 'wmctrl -R BIBLIO || exec xterm -title BIBLIO -geometry 80x35 -e editbib ~/research/tex/biblio.bib ~/research/tex/templates.bib'</execute></action></keybind>
  <keybind key="W-S-b"><action name="Execute">
    <execute>xbibfind -fc</execute></action></keybind>
  <keybind key="W-A-b"><action name="Execute">
    <execute>openurl https://bugs.eclipse.org/bugs</execute></action></keybind>

  <keybind key="W-c"><action name="Execute">
    <execute>xterm -title CALC -geometry 40x15 -e sh -c 'echo bc; exec bc -l'</execute></action></keybind>
  <keybind key="W-S-c"><action name="Execute">
    <execute>xcal</execute></action></keybind>

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

  <keybind key="W-e"><action name="Execute">
    <execute>xmid `xselection`</execute></action></keybind>

  <keybind key="W-d"><action name="Execute">  <!-- lookup definition -->
    <execute>openurl -dc</execute></action></keybind>
  <keybind key="W-S-d"><action name="Execute">  <!-- lookup thesaurus -->
    <execute>openurl -tc</execute></action></keybind>

  <keybind key="W-f"><action name="Execute">
    <execute>xmm</execute></action></keybind>
  <keybind key="W-S-f"><action name="Execute">
    <execute>xterm -e 'sudo tail -f /var/log/maillog | grep fetchmail'</execute></action></keybind>

  <keybind key="W-g"><action name="Execute"> <!-- prompted lookup-->
    <execute>websearch</execute></action></keybind>
  <keybind key="W-S-g"><action name="Execute"> <!-- open google -->
    <execute>openurl http://www.google.ca</execute></action></keybind>

  <keybind key="W-h"><action name="Execute"> <!-- display selected HTML text -->
    <execute>sh -c 'xselection | runtemp openbrowser'</execute></action></keybind>

  <keybind key="W-j"><action name="Execute">
    <execute>sh -c 'wmctrl -R J-Pilot || exec jpilot -a'</execute></action></keybind>
  <keybind key="W-S-j"><action name="Execute">
    <execute>sh -c 'wmctrl -R J-Pilot || exec jpilot -a'</execute></action></keybind>
  <keybind key="W-C-j"><action name="Execute">
    <execute>xterm -title JPILOT-SYNC -e sh -c 'xjpilot-sync; echo done; read input'</execute></action></keybind>
  <keybind key="W-S-C-j"><action name="Execute">
    <execute>xterm -title JPILOT-SYNC -e sh -c 'xjpilot-sync -B; echo done; read input'</execute></action></keybind>
    <!-- xterm -title JPILOT-SYNC -e sh -c 'remote-jpilot-sync; echo done; read input' -->
  <keybind key="W-A-j"><action name="Execute">
    <execute>sh -c 'wmctrl -x -R Shadow || exec shadowplan'</execute></action></keybind>

  <keybind key="W-l"><action name="Execute">
    <execute>sh -c 'wmctrl -R PHD-LOG || exec xterm -title PHD-LOG -geometry 80x35 -e editlog ~/research/phd/log'</execute></action></keybind>
  <keybind key="W-S-l"><action name="Execute">
    <execute>openurl http://127.0.0.1/cgi-bin/wiki.pl</execute></action></keybind>
  <keybind key="W-C-A-l"><action name="Execute">
    <execute>xlock</execute></action></keybind>

  <keybind key="W-m"><action name="Execute">
    <execute>xm</execute></action></keybind>
  <keybind key="W-S-m"><action name="Execute"> <!-- compose message --> 
    <execute>xm -title MAIL-COMPOSE -H /dev/null</execute></action></keybind>
  <keybind key="W-C-m"><action name="Execute"> <!-- open postponed messages -->
    <execute>xm -title MAIL-COMPOSE -p</execute></action></keybind>
  <keybind key="W-A-m"><action name="Execute"> <!-- open folders -->
    <execute>xm -y</execute></action></keybind>
  <keybind key="W-S-A-m"><action name="Execute"> <!-- open sent mail -->
    <execute>xm -f "&lt;"</execute></action></keybind>
  <keybind key="W-C-A-m"><action name="Execute"> <!-- open yahoo mail -->
    <execute>openurl 'http://us.f607.mail.yahoo.com/ym/ShowFolder?rb=Inbox&amp;reset=1&amp;YY=53897'</execute></action></keybind>
  <keybind key="W-C-S-A-m"><action name="Execute"> <!-- open yahoo mail -->
    <execute>openurl 'http://us.f607.mail.yahoo.com/ym/Compose?YY=10758'</execute></action></keybind>

  <keybind key="W-n"><action name="Execute">
    <execute>xjpaddtodo -p 5 -c Inbox</execute></action></keybind>
  <keybind key="W-S-n"><action name="Execute">
    <execute>xjpaddtodo -q -p 5 -c Z-Tickle</execute></action></keybind>
  <keybind key="W-A-n"><action name="Execute">
    <execute>sudo /usr/local/bin/reset-wi0</execute>
    </action></keybind>

  <keybind key="W-o"><action name="Execute">
    <execute>openurl "http://www.weatheroffice.ec.gc.ca/city/pages/sk-40_metric_e.html"</execute></action></keybind>

  <keybind key="W-p"><action name="Execute">
    <execute>xterm -title PING -geometry 80x15 -e ping www.ubc.ca</execute></action></keybind>
  <keybind key="W-S-p"><action name="Execute">
    <execute>xterm -title PING -geometry 80x15 -e ping -n 64.40.111.228</execute></action></keybind>
  <keybind key="W-S-A-p"><action name="Execute">
    <execute>sudo gtk_wicontrol</execute></action></keybind>
  <keybind key="W-C-p"><action name="Execute">
    <execute>openurl 'http://127.0.0.1/cgi-bin/wiki.pl?Projects'</execute></action></keybind>
  <keybind key="W-A-p"><action name="Execute">
    <execute>xterm -title PRINTERS -geometry 80x35 -e recurring -p 2 ssh okanagan.cs.ubc.ca checkprinters</execute>
    </action></keybind>

  <keybind key="W-q"><action name="Execute">
    <execute>xpdf ~/research/primers/paper-questions/paper-questions.pdf</execute></action></keybind>

<!-- removed as it prevents W-R in TSE/RDESKTOP
  <keybind key="W-r"><action name="Execute">
    <execute>xterm -title '*REMINDERS*' -e 'reminders; read input'</execute>
	</action></keybind>
-->

  <keybind key="W-s"><action name="Execute">
    <execute>xeditselection</execute></action></keybind>
  <keybind key="W-S-s"><action name="Execute">
    <execute>xeditselection -c</execute></action></keybind>
  <keybind key="W-A-s"><action name="Execute">
    <execute>leafpad</execute></action></keybind>

  <keybind key="W-t"><action name="Execute">
    <execute>xterm -title TOP -e sh -c 'top -I || top -i || top'</execute></action></keybind>

  <keybind key="W-w"><action name="Execute">
    <execute>openurl -c</execute></action></keybind>
  <keybind key="W-S-A-w"><action name="Execute">
    <execute>openurl -Tc</execute></action></keybind>
  <keybind key="W-S-w"><action name="Execute">
    <execute>openurl about:blank</execute></action></keybind>
  <keybind key="W-A-w"><action name="Execute"> <!-- search my brain -->
    <execute>openurl -bc</execute></action></keybind>
  <keybind key="W-C-w">				<!-- Invoke select menu -->
    <action name="ShowMenu"><menu>selection-menu</menu></action></keybind>

  <keybind key="W-x"><action name="Execute">
    <execute>xt 127.0.0.1</execute></action></keybind>
  <keybind key="W-S-x"><action name="Execute">
    <execute>xt bsd at cascade.cs.ubc.ca</execute></action></keybind>
  <keybind key="W-A-x"><action name="Execute">
    <execute>xt bsd at okanagan.cs.ubc.ca</execute></action></keybind>
  <keybind key="W-C-x"><action name="Execute">
    <execute> sh -c 'xt bsd@`xcontext xremotehost`'</execute>
    </action></keybind>
  <keybind key="W-C-A-x"><action name="Execute">
    <execute>sh -c 'xrc &amp; xterm -e tail -f .xsession-errors'</execute></action></keybind>

  <keybind key="W-Z">
    <action name="ToggleMaximizeFull"/>
  </keybind>
  <keybind key="W-S-Z">
    <action name="ToggleShade"/>
  </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) -->

  <context name="Frame">
    <mousebind button="W-Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="W-Left" action="Click">
      <action name="Raise"/>
    </mousebind>
    <mousebind button="W-Left" action="Drag">
      <action name="Move"/>
    </mousebind>

    <mousebind button="W-Right" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="W-Right" action="Press">
      <action name="Raise"/>
    </mousebind>
    <mousebind button="W-Right" action="Drag">
      <action name="Resize"/>
    </mousebind> 

    <mousebind button="W-Middle" action="Press">
      <action name="Focus"/>
      <action name="Lower"/>
    </mousebind>

<!--
    <mousebind button="W-Up" action="Click">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="W-Down" action="Click">
      <action name="DesktopNext"/>
    </mousebind>
    <mousebind button="W-C-Up" action="Click">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="W-C-Down" action="Click">
      <action name="DesktopNext"/>
    </mousebind>
    <mousebind button="W-S-Up" action="Click">
      <action name="SendToDesktopPrevious"/>
    </mousebind>
    <mousebind button="W-S-Down" action="Click">
      <action name="SendToDesktopNext"/>
    </mousebind>
-->
  </context>

  <context name="Titlebar">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <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="Focus"/>
      <action name="Lower"/>
    </mousebind>

    <mousebind button="Up" action="Click">
      <action name="Shade"/>
    </mousebind>
    <mousebind button="Down" action="Click">
      <action name="Unshade"/>
    </mousebind>

    <mousebind button="Right" action="Press">
      <action name="Focus"/>
      <action name="ShowMenu"><menu>client-menu</menu></action>
    </mousebind>
  </context>

  <context name="Top">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Raise"/>
    </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"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <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"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Raise"/>
    </mousebind>
    <mousebind button="Left" action="Drag">
      <action name="Resize"><edge>right</edge></action>
    </mousebind>
  </context>

  <context name="Handle">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Raise"/>
    </mousebind>
    <mousebind button="Left" action="Drag">
      <action name="Resize"><edge>bottom</edge></action>
    </mousebind>

    <mousebind button="Middle" action="Press">
      <action name="Focus"/>
      <action name="Lower"/>
    </mousebind>

    <mousebind button="Right" action="Press">
      <action name="Focus"/>
      <action name="ShowMenu"><menu>client-menu</menu></action>
    </mousebind>
  </context>

  <context name="BLCorner">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <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"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <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"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Raise"/>
    </mousebind>
    <mousebind button="Left" action="Drag">
      <action name="Resize"/>
    </mousebind>
  </context>

  <context name="TRCorner">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Raise"/>
    </mousebind>
    <mousebind button="Left" action="Drag">
      <action name="Resize"/>
    </mousebind>
  </context>

  <context name="Client">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Middle" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Right" action="Press">
      <action name="Focus"/>
    </mousebind>
  </context>

  <context name="Icon">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
      <action name="ShowMenu"><menu>client-menu</menu></action>
    </mousebind>
    <mousebind button="Right" action="Press">
      <action name="Focus"/>
      <action name="ShowMenu"><menu>client-menu</menu></action>
    </mousebind>
  </context>

  <context name="AllDesktops">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="ToggleOmnipresent"/>
    </mousebind>
  </context>

  <context name="Shade">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="ToggleShade"/>
    </mousebind>
  </context>

  <context name="Iconify">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Iconify"/>
    </mousebind>
  </context>

  <context name="Maximize">
    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Middle" action="Press">
      <action name="Focus"/>
    </mousebind>
    <mousebind button="Right" action="Press">
      <action name="Focus"/>
    </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"/>
    </mousebind>
    <mousebind button="Left" action="Click">
      <action name="Close"/>
    </mousebind>
  </context>

  <context name="Desktop">
    <mousebind button="Up" action="Press">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="Down" action="Press">
      <action name="DesktopNext"/>
    </mousebind>

    <mousebind button="A-Up" action="Press">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="A-Down" action="Press">
      <action name="DesktopNext"/>
    </mousebind>
    <mousebind button="C-A-Up" action="Press">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="C-A-Down" action="Press">
      <action name="DesktopNext"/>
    </mousebind>

    <mousebind button="Left" action="Press">
      <action name="Focus"/>
    </mousebind>
  </context>

  <context name="Root">
    <!-- Menus -->
    <mousebind button="Left" action="Press">
      <action name="ShowMenu"><menu>apps-menu</menu></action>
    </mousebind> 
    <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="Press">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="Down" action="Press">
      <action name="DesktopNext"/>
    </mousebind>
    <mousebind button="A-Up" action="Press">
      <action name="DesktopPrevious"/>
    </mousebind>
    <mousebind button="A-Down" action="Press">
      <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/) -->
  <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
      <y>200</y>
      # a number like 50, or 'center' to center on screen
      <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
-->
</applications>

</openbox_config>


More information about the openbox mailing list