Skip to content
Scrolling Layout

Scrolling Layout

Note

Looking for the old hyprlang syntax? Check the 0.54 wiki pages. Since Hyprland 0.55, hyprlang is deprecated in favor of lua.

Scrolling is a layout where windows get positioned on an infinitely growing tape.

Config

category name: scrolling (hl.config({ scrolling = {...} }))

namedescriptiontypedefault
fullscreen_on_one_columnwhen enabled, a single column on a workspace will always span the entire screen.booltrue
column_widththe default width of a column, [0.1 - 1.0].float0.5
focus_fit_methodWhen a column is focused, what method should be used to bring it into view. 0 = center, 1 = fitint1
follow_focuswhen a window is focused, should the layout move to bring it into view automaticallybooltrue
follow_min_visiblewhen a window is focused, require that at least a given fraction of it is visible for focus to follow. Hard input (e.g. binds, clicks) will always follow. [0.0 - 1.0]float0.4
explicit_column_widthsA comma-separated list of preconfigured widths for colresize +conf/-confstr"0.333, 0.5, 0.667, 1.0"
wrap_focusWhen enabled, causes hl.dsp.layout("focus l/r") to wrap around at the beginning and end.booltrue
wrap_swapcolWhen enabled, causes hl.dsp.layout("swapcol l/r") to wrap around at the beginning and end.booltrue
directionDirection in which new windows appear and the layout scrolls. "left"/"right"/"down"/"up"str"right"

Workspace rules

namedescriptiontype
directionSame as hl.config({ scrolling{ direction } })str

e.g.

hl.workspace_rule({ workspace = "2", layout_opts = { direction = "right" } })

Layout messages

Dispatcher hl.dsp.layout(msg) params:

namedescriptionparams
movemove the layout horizontally, by either a relative logical px (-200, +200) or columns (+col, -col)move data
colresizeresize the current column, to either a value or by a relative value e.g. 0.5, +0.2, -0.2 or cycle the preconfigured ones with +conf or -conf. Can also be all (number) for resizing all columns to a specific widthrelative float / relative conf
fitexecutes a fit operation based on the argument. Available: active, visible, all, toend, tobeg, expand.
fit expand Will expand the current window to take up the remaining free space on the monitor
fit mode
fit_into_viewfits the currently active column fully into viewnone
focusmoves the focus and centers the layout, while also wrapping instead of moving to neighboring monitors.direction
promotemoves a window to its own new columnnone
swapcolSwaps the current column with its neighbor to the left (l) or right (r). The swap wraps around (e.g., swapping the first column left moves it to the end).l or r
inhibit_scrollPrevents the scrolling view from moving for the currently active workspace. The switch is independent for each workspaceleft empty for toggle, or bool for explicitly enabling/disabling
expelmoves the current window to a dedicated columnnone
consumemoves the current window into the previous columnnone
consume_or_expelexpel if not alone, consume if alone in a columnprev or next

Example key bindings for your Hyprland config:

hl.bind(mainMod .. " + period", hl.dsp.layout("move +col"))
hl.bind(mainMod .. " + comma", hl.dsp.layout("swapcol l"))

Window rules

With the static rule scrolling_width you can set a starting column width for a window.

hl.window_rule({ name = "kitty_starting_width", match = { class = "kitty" }, scrolling_width = 0.5})
Last updated on