Layouts
Layout settings can live in wm.toml, but a dedicated layout.toml is easier
to maintain. The sidecar overlays wm.toml one recognized key at a time, so an
omitted value keeps the setting already loaded from wm.toml or the compiled
default.
Layout engines
Section titled “Layout engines”| Engine | Best suited to |
|---|---|
tile |
A master area beside a stack of secondary windows |
monocle |
One full-area window at a time |
grid |
Balanced rows and columns |
rows |
Full-width windows arranged in horizontal rows |
dwindle |
Alternating recursive splits |
scrolling |
PaperWM-style horizontal columns and viewport panning |
float |
Remembered, native, or rule-provided floating geometry |
game-mode |
One anchor window with companion windows beside it |
floating and game_mode are accepted aliases for float and game-mode.
A balanced starting point
Section titled “A balanced starting point”[layout]default = "scrolling"gaps_outer = 8gaps_inner = 4master_ratio = 0.55master_count = 1
# Colors use 0xAARRGGBB.border_width = 2border_focused = 0xFF88C0D0border_normal = 0xFF3B4252border_urgent = 0xFFBF616Aforce_ssd = false
[layout.slots]primary = "tile"secondary = "scrolling"tertiary = "monocle"quaternary = "grid"The four slots are targets for the set_layout_primary,
set_layout_secondary, set_layout_tertiary, and set_layout_quaternary
bindings.
Engine-specific options
Section titled “Engine-specific options”Every [layout.options.<id>] section accepts the common gap, master, and border
keys. Only monocle, dwindle, and scrolling add engine-specific keys.
[layout.options.tile]master_ratio = 0.60master_count = 1
[layout.options.monocle]hide_others = trueshow_borders = false
[layout.options.dwindle]split_ratio = 0.50start_axis = "vertical" # vertical | horizontal
[layout.options.scrolling]column_fraction = 0.50center_focused = truefollow_new_windows = truesnap_to_columns = falseallow_overscroll = true
[layout.options.float]border_width = 2Ratios must be greater than 0 and less than 1. Use TOML numbers and booleans
for these options, not quoted strings.
Select layouts by output and workspace
Section titled “Select layouts by output and workspace”An output can define its normal layout in either wm.toml or layout.toml.
Workspace mappings are also accepted in both files; define each mapping in only
one place.
[[output]]name = "DP-1"layout = "tile"
[[workspace]]workspace = 2layout = "monocle"
[[workspace]]output = "DP-1"workspace = 3layout = "dwindle"Layout selection resolves from highest to lowest priority:
- A layout selected at runtime for the active workspace
- An output-and-workspace mapping
- A workspace-only mapping
- The matching output’s default
[layout].default
Runtime selection is stored per workspace, so switching away and back preserves the layout you chose for that workspace during the session.
