Policy at a glance
The built-in commands encode window-manager policy borrowed from xmonad, i3/sway, EWMH, ICCCM and Wayland. The commands reference has the exact rules.
- Requested vs actual geometry.
window/move/window/resizestore a request;deriveuses it only for floating windows. Constraints (minWidth, …) apply to tiled windows as CSS min/max. - Size hints (ICCCM).
aspectRatio(exact or{ min, max }) and terminal-stylewidthIncrement/heightIncrement, honoured byconstrainSizefor floating move/resize.geometry.sizeToCellsgives a live “80×24”. - Focus is not stacking. Raising on focus is a policy (
config.focusRaises). Stacking is per layer (background,normal,top,modal,popover,notification,system), and raising a window raises its descendants above it. Tiled windows paint above the background layer and beneath everything else (paintOrder). - The modal graph. Focusing a window with an open modal descendant focuses the deepest modal instead. A blocked window’s contents are
inert, but the window itself stays hit-testable, so a click on it redirects focus instead of falling through. - Roles are semantic.
dialoganchors to its parent’s centre,menu/popover/tooltipanchor by side, andnotificationsits in a corner:derivedecides, not the application. - Rules (
config.rules, likeManageHooksorfor_window) setmode,layer,workspace, … atwindow/create. The caller’s explicit fields always win. - Scratchpad (i3), sticky (EWMH), urgency (EWMH/X11), pop-out (GoldenLayout/Dockview), multiple outputs (sway). All of these are pure state:
window/to-scratchpad+scratchpad/toggle;window/set-sticky;window/set-urgent+focus/urgent;window/pop-out/pop-in; andoutput/*with a per-outputderive(state, { output }). - Gestures are one step. Commands sharing a
gesturetoken form one undo step and one log entry, so a whole drag undoes at once. - Versioned state. Every state carries
STATE_VERSION,migrateupgrades older ones, and a newer one is refused (state/load-rejected), never half-loaded.