#+TITLE: Collapsible waybar sides — implementation spec #+AUTHOR: Craig Jennings & Claude #+DATE: 2026-06-19 * Goal Let each side of the waybar collapse to a minimal base set with a click, and expand again with another click. Each side carries a small arrowhead that points toward the screen edge when expanded (click to collapse outward) and flips to point toward center when collapsed (click to expand). Left and right collapse independently. This is dotfiles work (=~/.dotfiles=, =hyprland/= tier). Tracked by the =Collapsible waybar sides= task in archsetup =todo.org=. * Decisions (locked 2026-06-19) - *Mechanism*: config-swap + =killall -SIGUSR2 waybar=. NOT state-file + CSS — the spike proved CSS can't collapse native modules (they go invisible but hold their space; GTK3 has no =display:none=). See [[file:spike-findings.org]]. - *Right base set*: =custom/date=, =custom/worldclock=, =tray= (plus the right arrow). Tray reflows cleanly and survives the reload (spike-confirmed). - *Left base set*: =custom/menu=, =hyprland/workspaces= (plus the left arrow). - *Per-side*: left and right toggle independently, each with its own arrow. - *Per-host*: host-agnostic. The base set is constant; the full set is whatever each host's config already defines. ratio (no battery/touchpad/airplane) needs no special-casing — collapse hides whatever modules that host has. Build once. * Architecture ** The active-config indirection (the core piece) =~/.config/waybar/config= is a stow symlink into the dotfiles, so the toggle can't rewrite it in place (that would edit the repo). Instead: 1. *Canonical* config: the committed dotfiles config. Always holds the FULL module arrays. Read-only source of truth. Unchanged by this feature except for adding the two arrow modules and their definitions. 2. *Active* config: a generated copy at =$XDG_RUNTIME_DIR/waybar/config=. This is what waybar loads (=waybar -c=). The toggle rewrites its =modules-left= / =modules-right= between full and base. 3. *Launch change* (hyprland.conf exec-once): before launching waybar, generate the active config from the canonical (initial state = expanded/full), then =waybar -c "$XDG_RUNTIME_DIR/waybar/config" -s