Per-workspace tiling layouts for Sway and i3
Different layouts on every workspace — MasterStack, Autotiling, Grid, and more.
Features · Quick Start · Layouts · Configuration · Commands · Contributing
- 🖥️ Per-workspace layouts — MasterStack for coding, Grid for dashboards, Autotiling for everything else
- ⚡ Zero-latency —
nopbindings for instant response, no process spawning - 🔄 Hot reload — change config and reload without restarting
- 🎛️ Full runtime control — switch layouts, rotate windows, toggle stacks via keybindings
- 🐍 Extensible — write custom layouts in Python, auto-loaded from your config dir
- 💾 Minimal — single daemon process, simple TOML config
git clone https://github.com/mschulkind/layman
cd layman
pip install .Alternative: install with uv (faster)
git clone https://github.com/mschulkind/layman
cd layman
uv sync && uv tool install .mkdir -p ~/.config/layman# ~/.config/layman/config.toml
[layman]
defaultLayout = "MasterStack"
masterWidth = 50
stackLayout = "splitv"
stackSide = "right"
# Per-workspace overrides
[workspace.2]
defaultLayout = "Autotiling"
[workspace.3]
defaultLayout = "Grid"Add these lines to ~/.config/sway/config:
# Start the daemon
exec layman
# Switch layouts
bindsym $mod+m nop layman layout set MasterStack
bindsym $mod+a nop layman layout set Autotiling
bindsym $mod+g nop layman layout set Grid
# MasterStack controls
bindsym $mod+Return nop layman window swap master
bindsym $mod+t nop layman stack toggle
bindsym $mod+l nop layman stack side togglePress $mod+Shift+c — you're done!
💡 See example_sway_config for a complete keybinding setup including modes, focus history, and all layout controls.
Primary window on one side, stack on the other. New windows become master.
┌─────────┬──────────┐
│ │ Stack 1 │
│ Master ├──────────┤
│ │ Stack 2 │
│ ├──────────┤
│ │ Stack 3 │
└─────────┴──────────┘
Alternates horizontal/vertical splits based on window dimensions. Natural spiral pattern.
┌───┬───────────────────┐
│ │ 2 │
│ ├─────────┬─────────┤
│ 1 │ 3 │ 4 │
│ │ ├────┬────┤
│ │ │ 5 │ 6 │
└───┴─────────┴────┴────┘
Splits the largest container, creating balanced even layouts.
┌─────────┬─────────┐
│ 1 │ 2 │
├─────────┼─────────┤
│ 3 │ 4 │
└─────────┴─────────┘
Layman ships with 5 layouts and supports custom layouts — drop a Python file in ~/.config/layman/ that extends WorkspaceLayoutManager and it loads automatically.
Layman uses a single TOML file at ~/.config/layman/config.toml.
| Option | Default | Description |
|---|---|---|
defaultLayout |
"none" |
Layout for new workspaces |
masterWidth |
50 |
Master window width (1–99%) |
stackLayout |
"splitv" |
splitv, splith, tabbed, stacking |
stackSide |
"right" |
left or right |
visibleStackLimit |
3 |
Max visible stack windows |
depthLimit |
0 |
Autotiling depth limit (0 = unlimited) |
excludedWorkspaces |
[] |
Workspace numbers to ignore |
debug |
false |
Enable debug logging |
Override any option per-workspace with [workspace.N] sections.
→ Full config reference · Examples
All commands can be bound via nop (recommended, zero overhead) or exec:
bindsym $mod+m nop layman layout set MasterStack # nop binding (instant)
bindsym $mod+m exec layman layout set MasterStack # exec binding (works too)| Command | Description |
|---|---|
layout set <name> |
Set layout: MasterStack, Autotiling, Grid, ThreeColumn, TabbedPairs, none |
layout maximize |
Toggle fake fullscreen |
window swap master |
Swap focused window with master |
window focus master |
Focus the master window |
window move <dir> |
Move window: up, down, left, right |
window rotate cw/ccw |
Rotate windows clockwise/counter-clockwise |
stack toggle |
Cycle stack layout: splitv → splith → stacking → tabbed |
stack side toggle |
Toggle stack side: left ↔ right |
master add/remove |
Add or remove a master slot |
reload |
Reload configuration |
status |
Show current workspace state |
Systemd user service (recommended)
Create ~/.config/systemd/user/layman.service:
[Unit]
Description=Layman Layout Manager
After=graphical-session.target
[Service]
ExecStart=/usr/local/bin/layman
Restart=on-failure
[Install]
WantedBy=graphical-session.targetsystemctl --user enable --now layman| Configuration Reference | Every option explained |
| Configuration Examples | Common setups |
| Sway Integration | Full keybinding guide |
| Layout Details | In-depth layout docs |
| Custom Layouts | Write your own layouts |
| Development Guide | Setup, testing, contributing |
Inspired by layman by Joe Maples (frap129).
