Includes swapping functionality
Adapted from Christian Tenllado and YourArmpitStinks.
-
Download and place the files master-stack and swapper in your
~/.config/i3
directory. -
Add the following lines to your
~/.config/i3/config
#############
# AUTOSTART #
#############
exec --no-startup-id $HOME/.config/i3/master-stack
############
# BINDINGS #
############
bindsym $mod+Tab exec --no-startup-id $HOME/.config/i3/swapper
- You may have to restart i3 or log out and log back in for the changes to take effect.
The layout consists of a master window and a stack.
┌────────┬───────┐
│ │ │
│ Master │ Stack │
│ │ │
└────────┴───────┘
Opening a new window will set it as the master window, while consecutive windows will be automatically inserted into the stack.
┌────────┬───────┐
│ │ Stack │
│ Master │┄┄┄┄┄┄┄│
│ │ + │
└────────┴───────┘
Pressing the swapping keybind $mod+Tab
will
swap the focused window and the master window.
┌───────┬───────┐ ┏━━━━━━━┓───────┐
│ │ 2 │ ┃ ┃ 2 │
│ 1 ┢━━━━━━━┪ -> ┃ 3 ┠───────┤
│ ┃ 3 ┃ ┃ ┃ 1 │
└───────┗━━━━━━━┛ ┗━━━━━━━┹───────┘