From ce148759ad7aedfc359b93aafc292698e007bdad Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 27 Jun 2026 12:18:04 -0400 Subject: docs: file collapsible-waybar-sides spec to assets, close task --- .../2026-06-19-collapsible-waybar-sides-spec.org | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 assets/2026-06-19-collapsible-waybar-sides-spec.org (limited to 'assets/2026-06-19-collapsible-waybar-sides-spec.org') diff --git a/assets/2026-06-19-collapsible-waybar-sides-spec.org b/assets/2026-06-19-collapsible-waybar-sides-spec.org new file mode 100644 index 0000000..b9ddc0d --- /dev/null +++ b/assets/2026-06-19-collapsible-waybar-sides-spec.org @@ -0,0 +1,120 @@ +#+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