Skip to main content
Version: 2.2 (dev)

Scrollable tiling somewm-only

Carousel arranges clients in columns on a scrollable strip. Each column’s width_fraction sets its share of the viewport width. Clay computes the geometry and stores the scroll offset, labelled scroll in the dump.

Master and stackCarousel
visibleevery clientthe columns under the viewport
sizingshares of the workareaeach column its own fraction
a new clientthe others shrinka new column. The strip grows
navigationfocus moves between visible clientsfocus scrolls the viewport
master_count, master_width_factorusedignored
                      viewport (screen width)
|<---------------------->|
┌─────┬───────────┬───────────┬─────┬──────┐
│ col │ col 2 │ col 3 │ col │ col │
│ 1 │ │ (focused) │ 4 │ 5 │
└─────┴───────────┴───────────┴─────┴──────┘
|<-- strip (sum of all column widths) ----->|

Columns​

Each tag stores ordered columns with clients and width_fraction fields. Clients in a column split its height equally. New clients get a column after the focused one. Removed clients and empty columns are discarded on the next layout pass.

Scrolling​

When focus moves to a column outside the viewport, the carousel reads the solved boxes of the viewport and the column, computes the offset the centering mode asks for, and writes it to Clay's scroll record. The next frame scrolls there.

center_modeScrolls
on-overflow (default)only if the column is not fully visible. Then centres it
alwaysalways centres it. The first and last columns get a margin so they can be
edgethe least distance that brings it fully into view
neveronly if it is entirely off screen

The offset is clamped to the strip. With peek_width above zero the viewport is padded by peek_width + useless_gap on each side, so that many pixels of the neighbouring columns show.

A scroll moves every client's box. With theme.animation_layout_duration above 0, client frames animate over that duration. At 0, a scroll snaps. There is no carousel-specific setting.

carousel.vertical is the same layout turned 90 degrees: columns scroll vertically and a column's clients sit side by side.

Carousel reference has every property and function. the tutorial is a first session.