setlayout - bakkeby/dusk GitHub Wiki

Function Expected argument Default keybinding
setlayout int, e.g. 0 or 5 Super+space (toggles previous layout)

setlayout is an internal function that is used to set a layout for a workspace.

Note that contrary to dwm there are no default keybindings for setting specific layouts, but you can add these yourself should you need them.

Example keybindings to set specific layouts:

	{ KeyPress,   MODKEY,     XK_,      setlayout,     {0} }, // sets tile layout
	{ KeyPress,   MODKEY,     XK_,      setlayout,     {3} }, // sets monocle layout
	{ KeyPress,   MODKEY,     XK_,      setlayout,     {-1} }, // toggles between current and previous layout

Passing an integer that is larger than the number of layouts will result in a no-op.

Refer to the layouts[] array in config.h for layout options.

External commands:

$ duskc run_command setlayout 3  # change to monocle layout

Back to Functions > Layout.

⚠️ **GitHub.com Fallback** ⚠️