Skip to content
Dwindle layout

Dwindle layout

Dwindle is a BSPWM-like layout, where every window on a workspace is a member of a binary tree.

Quirks

Dwindle splits are NOT PERMANENT. The split is determined dynamically with the W/H ratio of the parent node. If W > H, it’s side-by-side. If H > W, it’s top-and-bottom. You can make them permanent by enabling preserve_split.

Config

Category: dwindle

NameDescriptionTypeDefaultLimits
force_split0 - split follows mouse, 1 - always split to the left (new = left or top), 2 - always split to the right (new = right or bottom)int0[0 - 2]
preserve_splitIf enabled, the split (side/top) will not change regardless of what happens to the containerboolfalse
smart_splitIf enabled, allows a more precise control over the window split direction based on the cursor’s position. The window is conceptually divided into four triangles, and cursor’s triangle determines the split direction. This feature also turns on preserve_splitboolfalse
smart_resizingIf enabled, resizing direction will be determined by the mouse’s position on the window (nearest to which corner). Otherwise, it is based on the window’s tiling positionbooltrue
permanent_direction_overrideIf enabled, makes the preselect direction persist until either this mode is turned off, another direction is specified, or a non-direction is specified (anything other than l, r, u/t, d/b)boolfalse
special_scale_factorSpecifies the scale factor of windows on the special workspacefloat1[0 - 1]
split_width_multiplierSpecifies the auto-split width multiplier. Multiplying window size is useful on widescreen monitors where window W > H even after several splitsfloat1.0[0.1 - 3.0]
use_active_for_splitsWhether to prefer the active window or the mouse position for splitsbooltrue
default_split_ratioThe default split ratio on window open. 1 means an even 50/50 splitfloat1.0[0.1 - 1.9]
split_biasSpecifies which window will receive the split ratio. 0 - directional (the top or left window), 1 - the current windowint0[0 - 1]
precise_mouse_moveDragging and dropping windows will place them more precisely, based on where your mouse isboolfalse

Dispatchers

DispatcherDescriptionParams
window.pseudoToggles the given window’s pseudo modeLeft empty/"active" for current, or "window" for a specific window

Layout messages

Dispatcher hl.dsp.layout() arguments:

ParamDescriptionArgs
movetorootMoves the window to the root of the workspace tree. See the note belowwindow?, “unstable”?
preselectA one-time override for the split direction, valid for the next window to be opened, only works on tiled windowsdirection
rotatesplitRotates the split of the current window by an optionally specified angle. Angle must be a multiple of 90. Positive is clockwise, negative is counter-clockwiseint? = 90
splitratioChanges the split ratio. See the note belowfloat
swapsplitSwaps the two halves of the split of the current windowNone
togglesplitToggles the split (top/side) of the current window. preserve_split must be enabled for toggling to workNone

movetoroot

Make the specified window a child of its most immediate root node on the workspace. If the window is already a direct child of the root node, a warning is produced instead.

The default behavior is “stable” in that the focused window remains on the same side of screen. Adding unstable as the second argument will instead swap the positions of the root node’s immediate children (i.e. which side of the screen they’re on).

Note that movetoroot unstable is not valid, but movetoroot active unstable is the proper way to achieve this.

splitratio

splitratio uses delta value by default, add exact after a value to set it instead. A positive delta is used by default. To specify direction, prefix the value with plus (+) or minus (-) sign.

Values outside of the [0.1 - 1.9] range will be clamped to the nearest limit.

Examples
-- Use movetoroot on window with "imcool" class
hl.bind("SUPER + A", hl.dsp.layout("movetoroot class:imcool"))

hl.bind("SUPER + A", hl.dsp.layout("togglesplit"))

-- Set split ratio to 1.2
hl.bind("SUPER + A", hl.dsp.layout("splitratio 1.2 exact"))

-- Make split ratio 0.8 after previous dispatch
hl.bind("SUPER + A", hl.dsp.layout("splitratio -0.4"))
Last updated on