Skip to main content

kiln.ui.bar

Registers fn as a bar on screen s. The bar reserves workarea on its edge. Call once during config setup, outside declarations.

ui.bar(s, { edge = "top" }, function()
kiln.widgets.taglist(s)
ui.spacer()
kiln.widgets.clock()
end)

Options​

Accepts the element options with these defaults and additions:

FieldDefaultMeaning
edge"top""top", "bottom", "left" or "right". An invalid edge raises.
band"above"Stacking band.
dirfrom the edge"row" for top and bottom, "column" for left and right.
h (top/bottom), w (left/right)theme.bar_heightThe across-edge axis. The along-edge axis is always "grow"; only it and the bar's id are forced.
pad{ x = 8 } horizontal, { y = 8 } verticalPadding on the along axis.
gap6Space between cells.
aligncross-axis center{ y = "center" } on a row, { x = "center" } on a column.
colortheme.bgBackground.

Defaults are read each frame. Changes to theme.bg or theme.bar_height apply on the next frame to bars that left those fields unset.

Use h for horizontal bar thickness and w for vertical bar thickness. There is no height field. Unknown fields are ignored.