HOWTO: [resize, split, windows, LXDE, Lubuntu, Openbox] How to resize windows with hotkeys under Lubuntu (LXDE)

I always need to split a screen in half, using two (or more) tiled windows. I certainly can do it with my mouse but I'd spend too much calories doing it so I decided to configure my Lubuntu Openbox to get it done with hotkeys

howto resize split windows lxde lubuntu openbox how to resize windows with hotkeys under lubuntu lxde allart softworks

If you want to save calories, too, open .config/openbox/lubuntu-rc.xml with your favorite editor and put this code after  <keyboard> tag:

<!-- Keybindings for window tiling -->

    <keybind key="C-W-Up">        # FullScreen
      <action name="Maximize"/>
    </keybind>
    <keybind key="C-W-Down">        # MiddleScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>center</x><y>center</y><width>50%</width><height>50%</height></action>
    </keybind>

    <keybind key="C-W-Left">        # HalfLeftScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
    </keybind>
    <keybind key="C-W-Right">        # HalfRightScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-1">        # UpperQuarterLeft
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>50%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-2">        # LowerQuarterLeft
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>-0</y><height>50%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-3">        # LowerQuarterRight
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>-0</y><height>50%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-4">        # UpperQuarterRight
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>50%</height><width>50%</width></action>
    </keybind>

C-W-Up means CTRL + SUPER + ↑.

You obviously can change parameters (percentage and position) to fit your needs. I just added to the reply found on AskUbuntu my shortcuts to resize window half the size of the screen and position it at the top or at the bottom with C-W-d or C-W-s. That's it. 

<keybind key="C-W-d">        # HalfTopScreen
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo"><x>-0</x><y>0</y><height>50%</height><width>100%</width></action>
</keybind>

<keybind key="C-W-s">        # HalfBottomScreen
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo"><x>-0</x><y>50%</y><height>50%</height><width>100%</width></action>
</keybind>

Don't forget to apply changes with 

openbox --reconfigure

Credits to AskUbuntu user Glutanimatehttps://askubuntu.com/posts/306172/revisions

HIH

You may also like

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

undici + 16 =