All Projects → nwg-piotr → Autotiling

nwg-piotr / Autotiling

Licence: gpl-3.0
Script for sway and i3 to automatically switch the horizontal / vertical window split orientation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Autotiling

dotfiles
My dotfiles, with an out-of-date install-script. Arch, Tiling WM (i3, sway), ZSH, Neovim
Stars: ✭ 20 (-91.77%)
Mutual labels:  i3, i3wm, i3-gaps
ansible-debian
Buildfiles: Ansible automated leight-weight and sensible Debian provisioning
Stars: ✭ 83 (-65.84%)
Mutual labels:  i3, i3wm, i3-gaps
no-mans-sky-rice-i3wm
i3WM rice themed using No Man's Sky's colors
Stars: ✭ 34 (-86.01%)
Mutual labels:  i3, i3wm, i3-gaps
i3-create-config
Script to create an i3 config from multiple files.
Stars: ✭ 27 (-88.89%)
Mutual labels:  i3, i3wm, i3-gaps
I3
A fork of the i3 window manager with gaps and some other features
Stars: ✭ 5,512 (+2168.31%)
Mutual labels:  i3, i3wm, i3-gaps
I3 Gaps Deb
Tool to create and install Debian (or Ubuntu) packages of i3-gaps.
Stars: ✭ 236 (-2.88%)
Mutual labels:  i3, i3wm, i3-gaps
i3status
Simple status bar for i3 / i3-gaps / sway written in bash and python
Stars: ✭ 69 (-71.6%)
Mutual labels:  i3, i3wm, i3-gaps
dotfiles
💻 🍚 🔳 🔲 My riced-up Kali dotfiles – off-white | dark leet | chrome lambo
Stars: ✭ 55 (-77.37%)
Mutual labels:  i3, i3wm, i3-gaps
I3 And Kde Plasma
How to install the i3 window manager on KDE
Stars: ✭ 279 (+14.81%)
Mutual labels:  i3, i3wm, i3-gaps
Dotfiles
🐲 My Arch Linux config [i3-gaps + i3blocks + Zsh + Spacemacs + Rofi + Alacritty + Neofetch]
Stars: ✭ 725 (+198.35%)
Mutual labels:  i3, i3wm, i3-gaps
I3 Config
I3-gaps configuration
Stars: ✭ 67 (-72.43%)
Mutual labels:  i3, i3wm, i3-gaps
I3 Wm Config
I3 tiling window manager configuration
Stars: ✭ 109 (-55.14%)
Mutual labels:  i3, i3wm
I3 Gnome Pomodoro
🍅 Integrate gnome-pomodoro into i3
Stars: ✭ 159 (-34.57%)
Mutual labels:  i3, i3wm
Luastatus
universal status bar content generator
Stars: ✭ 195 (-19.75%)
Mutual labels:  i3, i3wm
I3 Battery Popup
A script that shows warning messages to the user when the battery is almost empty. For i3wm users.
Stars: ✭ 190 (-21.81%)
Mutual labels:  i3, i3wm
I3wsr
Change i3-wm workspace names based on content
Stars: ✭ 107 (-55.97%)
Mutual labels:  i3, i3wm
Sgtk Menu
GTK launchers for sway & other WMs w/ menu, dmenu, application grid and button bar
Stars: ✭ 112 (-53.91%)
Mutual labels:  i3, i3wm
Tmux Tilish
Plugin which makes tmux work and feel like i3wm
Stars: ✭ 149 (-38.68%)
Mutual labels:  i3, i3wm
Wmfocus
Visually focus windows by label
Stars: ✭ 132 (-45.68%)
Mutual labels:  i3, i3wm
I3wm Themer
🎨 Theme collection manager for i3-wm
Stars: ✭ 1,854 (+662.96%)
Mutual labels:  i3wm, i3-gaps

autotiling

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.

Inspired by https://github.com/olemartinorg/i3-alternating-layout.

See on YouTube:

Auto-tiling in action

PLEASE DO READ THIS

This script does one thing: when a window is being focused, it checks it's height / width ratio, and executes the equivalent of either swaymsg splitv or swaymsg splith. Nothing less, nothing more. Yes, it may make stacking and tabbed layouts behave oddly. No, nothing can be done about it. If you like stacking/tabbed layouts, you may use them on workspaces with autotiling turned off (--workspaces argument). Do not submit issues about it.

For instance, on my triple-headed setup (2 workspaces per output), I configured autotiling to work on odd workspaces, but not on even:

### Autostart
  exec autotiling -w 1 3 5

Installation

  1. Install autotiling. Possible methods:

    • PyPi.

      PyPi Version

      autotiling is available from PyPi, so you can install it with

      pip install autotiling
      
    • Arch Linux

      Packaging status

      For the latest development version use autotiling-git.

    • Manually

      1. Install the python-i3ipc>=2.0.1 package (or whatever it's called in your Linux distribution).
      2. Save the main.py file anywhere, make executable and autostart in your i3/sway config file: exec /path/to/the/script/main.py on sway or exec_always --no-startup-id /path/to/the/script/main.py on i3. You can give the main.py file another name.

    NOTE: The current release and master branch is compatible with sway >= 1.5. For lower versions you need to use the script from the sway14 branch or the 0.9 release.

  2. Add exec autotiling to the ~/.config/sway/config or exec_always --no-startup-id autotiling to the ~/.config/i3/config file.

Usage

$ autotiling -h
usage: autotiling [-h] [-d] [-v] [-w [WORKSPACES ...]]

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Print debug messages to stderr
  -v, --version         display version information
  -w [WORKSPACES ...], --workspaces [WORKSPACES ...]
                        Restricts autotiling to certain workspaces. Example: autotiling --workspaces 8 9
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].