How to resize windows using hot keys to fill 50% of the screen?

In lubuntu 18.04 I can do this easily using keys [Super] + [arrows]. But in lubuntu 20.04 this function was lost. It is strange that I could not find any related topic here.

Someone could help me?

I’m not sure about the changes since 18.04, as I only just started using Lubuntu myself yesterday. In 20.04, you can add hot keys to do this to your ~/.config/openbox/lxqt-rc.xml file. Presumably this is what 18.04 included by default.

Using the [Super] key seems to be a bit tricky, because it conflicts with the hot key for opening the LXQt main menu. Any other unused key combinations are usable, though.

In the example below, I’ve used [Control]+[Shift]+[arrows].

In the <keyboard> section in your ~/.config/openbox/lxqt-rc.xml file, add:

<keybind key="C-S-Left">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>50%</width>
    <height>100%</height>
    <x>0%</x>
    <y>0%</y>
  </action>
</keybind>
<keybind key="C-S-Right">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>50%</width>
    <height>100%</height>
    <x>50%</x>
    <y>0%</y>
  </action>
</keybind>
<keybind key="C-S-Down">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>100%</width>
    <height>50%</height>
    <x>0%</x>
    <y>50%</y>
  </action>
</keybind>
<keybind key="C-S-Up">
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo">
    <width>100%</width>
    <height>50%</height>
    <x>0%</x>
    <y>0%</y>
  </action>
</keybind>

Save the file, then open a terminal and enter the command openbox --reconfigure to make the changes take effect.

2 Likes

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.