This script uses the i3ipc-python library to switch the layout splith/splitv depending on the currently focused window dimensions. It works on both sway and i3 window managers.
Install autotiling. Possible methods:
autotiling is available from PyPi, so you can install it with
pip install autotiling
For the latest development version use autotiling-git.
python-i3ipc>=2.0.1package (or whatever it's called in your Linux distribution).
main.pyfile anywhere, make executable and autostart in your i3/sway config file:
exec /path/to/the/script/main.pyon sway or
exec_always --no-startup-id /path/to/the/script/main.pyon i3. You can give the
main.pyfile another name.
snap install autotiling
exec autotiling to the
exec_always --no-startup-id autotiling to the