Moving window to edge in Lubuntu 14.04 (updated)

I'm a big fan of Lubuntu, the lightweight alternative Linux OS, especially on my day-2-day laptop, an older Acer Aspire 8935G (8GB DDR, 2TB storage).

Whilst the core of Lubuntu is Ubuntu it uses the minimal desktop LXDE. My only drawback with Lubuntu is that occasionally I need my terminal window to take up half the screen (left or right) or sometimes both if I am comparing code or files and it is a pain to resize the terminal window rather than snapping the window to the edge. At present Openbox doesn't provide this feature :-( maybe later releases will :-)

I'm currently stuck with Lubuntu release 14.04 as I rely on this version for my SIFT Workstation and REMnux installations;

I've been testing a few methods and a few key mapping macros, but nothing came close until I came across an article (I must remember where) which provided a method of using SuperWin + UP/Down/Left Right to snap the currently window at the desired location.

And here's the steps needed:-

  • Open a terminal window, and using your favourite text edit, open the the file ~/.config/openbox/lubuntu-rc.xml
  • Locate the line <chainQuitKey>C-g</chainQuitKey>. Then copy and paste the following code:
    <!-- Aero Snap for Openbox Begin Code-->
     <keybind key="W-Left"> # HalfLeftScreen
     <action name="UnmaximizeFull"/>
     <action name="MoveResizeTo">
     <x>0</x>
     <y>0</y>
     <height>97%</height>
     <width>50%</width>
     </action>
     </keybind>
     <keybind key="W-Right"> # HalfRightScreen
     <action name="UnmaximizeFull"/>
     <action name="MoveResizeTo">
     <x>-0</x>
     <y>0</y>
     <height>97%</height>
     <width>50%</width>
     </action>
     </keybind>
     <keybind key="W-Up"> # HalfUpperScreen
     <action name="UnmaximizeFull"/>
     <action name="MoveResizeTo">
     <x>0</x>
     <y>0</y>
     <width>100%</width>
     <height>50%</height>
     </action>
     </keybind>
     <keybind key="W-Down"> # HalfLowerScreen
     <action name="UnmaximizeFull"/>
     <action name="MoveResizeTo">
     <x>0</x>
     <y>-0</y>
     <width>100%</width>
     <height>50%</height>
     </action>
     </keybind>
    <!-- Aero Snap for Openbox End Code-->
  • Save your changes and exit your text editor
  • Reload openbox configuration:
    # openbox --reconigure
  • Now you snap/resize the current window to left,right,top or botton half of the current screen (ie: Super+Left, Super+Right or Super+Up and Super+down)

Thanks to the boys+girls who provided the original post, as soon as I find it i'll give the credit accordingly

Updated 01-Jun-2015 — I finally found the original article titled Areosmap (window to the edge), which is available here. All credit goes to the original authors, I'm just happy to share it