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.
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 Glutanimate: https://askubuntu.com/posts/306172/revisions
HIH