Auto-resizing windows?

Sorry if this isn’t the right place to post this, but I don’t know where I should ask it, and here seemed the best.
So, my question is simple, what about adding (tell me if there’s a way to do it) auto resizing windows like in windows 11? The thing where you can choose to resize the windows to half screen or a quarter and the other windows can match to fill the entire display

I just think that it’s a very intelligent and useful feature

1 Like

Something like this?

4 Likes

Yeah, in Windows 11 when the cursor hovers over the resizing button a small window appears with the screen divided in 2 half, in 4 quarters or in 2 quarters and a half (one with the half window on the right and one with it on the left), that would be amazing.

2 Likes

Everything I know about the subject (with Lubuntu) is in the link I shared. Curiously, this coincided with a post just made on a forum I help moderate (full disclosure). It’s about KDE Plasma. Check the third post down. I’ll try to link to it directly:

2 Likes

Simply add this code to the <keyboard>...</keyboard> section of ~/.config/openbox/rc.xml (note C-W-Left means Ctrl+Windows key+Left key; you can obviously configure this to whatever your preference).

    <!-- Snap to left, full height   -->
    <keybind key="C-W-Left">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <height>100%</height>
        <width>50%</width>
      </action>
    </keybind>
    <!-- Snap to right, full height -->
    <keybind key="C-W-Right">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <height>100%</height>
        <width>50%</width>
      </action>
    </keybind>
    <!-- Snap to top, full width   -->
    <keybind key="C-W-Up">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
    </keybind>
    <!-- Snap to bottom, full width   -->
    <keybind key="C-W-Down">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>50%</y>
        <width>100%</width>
        <height>50%</height>
      </action>
    </keybind>
    <!-- Snap to corners -->
    <keybind key="C-W-q">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <height>50%</height>
        <width>50%</width>
      </action>
    </keybind>
    <keybind key="C-W-e">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>50%</x>
        <y>0</y>
        <height>50%</height>
        <width>50%</width>
      </action>
    </keybind>
    <keybind key="C-W-z">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>50%</y>
        <height>50%</height>
        <width>50%</width>
      </action>
    </keybind>
    <keybind key="C-W-c">
      <action name="Unmaximize"/>
      <action name="MoveResizeTo">
        <x>50%</x>
        <y>50%</y>
        <height>50%</height>
        <width>50%</width>
      </action>
    </keybind>

3 Likes

Works like a charm, thank you mate

3 Likes