PreviousNext
Help > 37. Openbox for multihead users
37. Openbox for multihead users

While Openbox provides better than average multihead support on its own, openbox-multihead-gitAUR provides a development branch called Openbox Multihead that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the Xmonad web site. Also, please see README.MULTIHEAD for a more comprehensive description of the new features and configuration options found in Openbox Multihead.

Openbox Multihead will function like normal Openbox when only a single head is available.

Launch a complex command with hotkey

If you need to execute a complex command, use shell functionality.

When writing your own scripts, make sure to escape xml special characters, such as "&" ("&amp;"), "<" ("&lt;"), ">" ("&gt;") and other (see more on Predefined entities in XML).

This example will turn off display immediately and lock screen with slock. It was taken from this thread.

 <keybind key="W-l">

   <action name="Execute">

     <command>sh -c 'slock &amp; (sleep .5 &amp;&amp; xset dpms force off)'</command>

   </action>

 </keybind>

Sometimes one need to specify environment variable for application:

 <keybind key="A-F7">

   <action name="Execute">

     <command>sh -c "LC_ALL=C obconf"</command>

   </action>

 </keybind>

Another example will launch application preserving all stdout and stderr output to file:

 <keybind key="A-f">

   <action name="Execute">

     <command>sh -c sh -c "exec gimp &gt;/tmp/gimp.out 2&gt;&amp;1"</command>

   </action>

 </keybind>

Enable screenshot:

 <keybind key="Print">

   <action name="Execute">

     <command>gnome-screenshot -c</command>

   </action>

 </keybind>

 <keybind key="A-Print">

   <action name="Execute">

     <command>gnome-screenshot -c -w</command>

   </action>

 </keybind>

 <keybind key="W-Print">

   <action name="Execute">

     <command>gnome-screenshot -i</command>

   </action>

 </keybind>