Areosnap (window to the edge)

← Go back to Tips and Tricks


AeroSnap is a feature of some window managers to anchor the windows to the  screen edges. Sadly, Openbox does not provide this feature but ronniew told us the way we can do it. IMPORTANT: don't do this with Lubuntu 13.04 because it's already implemented!




  • Open a terminal and type this:

    leafpad .config/openbox/lubuntu-rc.xml

  • Now find 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, close and restart. Now you can control the window behaviour using Super (the key often named Win)+Up, Super+Down, Super+Left or Super+Right, and the selected window will occupy that position.

← Go back to Tips and Tricks

5 comments:

  1. That's really cool, the most amazing feature is really the right click + ALT, really nice, and more productive than fancy M$'s aero, or other buggy windows managers.

    Openbox is certainly the best window manager, light, fast and minimum of features, but the default behavior to switch screen on edge is sometime annoying when working on a small laptop.

    ReplyDelete
  2. Thank you so much for these tutorials! I am an Ubuntu enthusiast, but new to Lubuntu, and I have greatly appreciated these walk throughs!

    ReplyDelete
  3. Thank so much for your words :D And stay tuned, more tutorials to come!

    ReplyDelete
  4. Thank you very much for the share. My Lubuntu 14.04 works perfect on snapping. Command : (Win Key) + Up/Down/Left/Right

    ReplyDelete
  5. Glad to hear it, Oney ;)

    ReplyDelete