Skip to content
Scrolling layout

Scrolling layout

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

Config

Category: scrolling

Name Description Type Default Limits
fullscreen_on_one_column When enabled, a single column on a workspace will always span the entire screen bool true
column_width The default width of a column float 0.5 [0.1 - 1.0]
focus_fit_method When a column is focused, what method should be used to bring it into view. 0 = center, 1 = fit int 1 [0 - 1]
follow_focus Behaviour of the scrolling tape when a window is in focus. 0: Focus doesn’t cause tape move. 1: Focus may cause tape move, mouse click always moves the tape. 2: Focus may cause tape move. int 1 [0 - 2]
follow_min_visible When 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 float 0.4 [0.0 - 1.0]
explicit_column_widths A comma-separated list of preconfigured widths for colresize +conf/-conf string "0.333, 0.5, 0.667, 1.0"
wrap_focus When enabled, causes hl.dsp.layout("focus l/r") to wrap around at the beginning and end bool true
wrap_swapcol When enabled, causes hl.dsp.layout("swapcol l/r") to wrap around at the beginning and end bool true
direction Direction in which new windows appear and the layout scrolls. "left"/"right"/"down"/"up" string "right"

Workspace rules

name description type
direction Same as the scrolling.direction config option, but per workspace string

For example:

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

Layout messages

Dispatcher hl.dsp.layout() arguments:

name description params
center Centers the currently focused column none
colresize Resize 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 width relative float/relative conf
consume Moves the current window into the previous column none
consume_or_expel Expel if not alone, consume if alone in a column prev or next
expel Moves the current window to its own new column (in the backward direction if window is in the top half of the screen, otherwise in the forward direction) none
fit Executes a fit operation based on the argument. Available: active, visible, all, toend, tobeg, expand. expand will expand the current window to take up the remaining free space on the monitor fit mode
fit_into_view Fits the currently active column fully into view none
focus Moves the focus and centers the layout, while also wrapping instead of moving to neighboring monitors direction
inhibit_scroll Prevents the scrolling view from moving for the currently active workspace. The switch is independent for each workspace left empty for toggle, or bool for explicitly enabling/disabling
move Move the layout horizontally, by either a relative logical px (-200, +200) or columns (+col, -col) move data
promote Moves a window to its own new column (in the forward direction) none
swapcol Swaps 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

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})

Layout-Handled Fullscreen

Scrolling has an optional layout-handled fullscreen behavior, which uses its own fullscreen handler. This custom fullscreen behavior allows you to scroll away from your fullscreen windows without them being un-fullscreened.

You can use it by using layout_aware = true (or not specifying layout_aware option at all) in your fullscreen dispatches when on a scrolling layout workspace. It also works with existing window/workspace fullscreen-related selectors.

Note

When a fullscreen window has focus, the hl.dsp.focus({ direction }) dispatcher will by default look for other monitors in the specified direction, rather than changing windows on the current monitor. If you want to take advantage of the layout-handled ability to scroll away from a fullscreen window, either set binds.movefocus_cycles_fullscreen = true to restore the focus dispatcher’s window-seeking behavior, or use the scrolling layout’s focus layout message instead.

Learn more about Fullscreen Handlers here.

Last updated on