Dotfiles/desktopenvs/hyprlua/hypr/layouts/columns.lua

35 lines
1.6 KiB
Lua

-- Columns: the scrolling engine, presented as independent columns. Each column is a
-- stack of windows; windows move up/down within their column and columns move
-- left/right — every column independently (this is exactly what the scrolling
-- backend's per-column tape already does).
--
-- The one menu control is orientation — which way the tape scrolls — chosen from a
-- dropdown of two friendly options (see dir_labels):
-- * "Left / Right" -> columns sit side by side, the tape scrolls horizontally
-- (scrolling:direction = "right").
-- * "Up / Down" -> columns are stacked as rows, the tape scrolls vertically
-- (scrolling:direction = "down").
--
-- Shares the scrolling backend and all scrolling:* options with the "scrolling"
-- layout; direction is a global Hyprland option, so switching orientation here
-- affects every scrolling/columns workspace (same limitation as scrolling.lua).
return {
name = "columns",
label = "Columns",
backend = "scrolling", -- hyprland general.layout value
directional = true,
dirs = { "right", "down" },
dir_labels = { "Left / Right", "Up / Down" },
default_dir = "right",
fit_method = true, -- exposes the "Centered follow" toggle in the menu
config = {
scrolling = {
direction = "right",
column_width = 0.5,
focus_fit_method = 1,
follow_focus = true,
fullscreen_on_one_column = true,
},
},
}