Is there any way I can tile two windows horizontally (⬒) or vertically (◧ ) under Lubuntu/LXDE/Openbox? Maybe via a keyboard shortcut or panel button?
Is there any way I can tile two windows horizontally (⬒) or vertically (◧ ) under Lubuntu/LXDE/Openbox? Maybe via a keyboard shortcut or panel button?
Configuration:
Yes, you can achieve this by adding a few custom keyboard shortcuts to your openbox configuration file.
Open your
rc.xml
variant (e.g.~/.config/openbox/lxde-rc.xml
,../lubuntu-rc.xml
or../rc.xml
) and insert the following snippet within the<keyboard>..</keyboard>
section:Shortcuts in action:
Usage:
To modify these assignments simply edit the
<keybind key="...">
lines in the snippet above.Notes:
Glutanimate's answer (on this page) is excellent, but might benefit from a little extra info when applying this to Raspbian:
The openbox config file on Raspbian is
.config/openbox/lxde-pi-rc.xml
. It is "minified" so it's all one line of text, and doesn't contain a keyboard section by default.A clean solution would be to open this file in something like VScode and change the formatting, then add the proper section, re-minify if you like, then copy that back onto the Pi.
I opted for quick and dirty, but functional:
.config/openbox/lxde-pi-rc.xml
with your choice of text editor</openbox_config>
, which is at the end of the really long "minified" linePut your cursor in front of that string and hit Enter a couple of times so it's on the next line with a space in between, like this:
Add these lines in the space:
Copy the lines from Glutanimate's answer between the
<keyboard></keyboard>
tags.openbox --reconfigure
Lubuntu LXDE already has simpler bindings with the Superkey+the desired arrow key See below and just try it before modifying the rc.xml unless you need to change the keys.
I also modified the config to add 1/4 screen so 4 windows can be set in each corner along with a toggle maximize hotkey. Superkey+Alt+plus arrow. Superkey+Ctrl+Up to toggle maximize.