diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 12:18:04 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 12:18:04 -0400 |
| commit | ce148759ad7aedfc359b93aafc292698e007bdad (patch) | |
| tree | 791d6e04be3a875f93505605b07c00db9238b9a3 /assets/2026-06-18-collapsible-waybar-sides-spike-findings.org | |
| parent | 811b22cf2f8c5ab8f71bf7f18d5db0a9b34a4fe4 (diff) | |
| download | archsetup-ce148759ad7aedfc359b93aafc292698e007bdad.tar.gz archsetup-ce148759ad7aedfc359b93aafc292698e007bdad.zip | |
docs: file collapsible-waybar-sides spec to assets, close task
Diffstat (limited to 'assets/2026-06-18-collapsible-waybar-sides-spike-findings.org')
| -rw-r--r-- | assets/2026-06-18-collapsible-waybar-sides-spike-findings.org | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/assets/2026-06-18-collapsible-waybar-sides-spike-findings.org b/assets/2026-06-18-collapsible-waybar-sides-spike-findings.org new file mode 100644 index 0000000..4d45ed1 --- /dev/null +++ b/assets/2026-06-18-collapsible-waybar-sides-spike-findings.org @@ -0,0 +1,42 @@ +#+TITLE: Collapsible waybar — spike findings (mechanism) +#+DATE: 2026-06-18 + +* Question +Which mechanism actually collapses a waybar side to a base set, given the right +side is a mix of native modules (group/sysmonitor, pulseaudio, pulseaudio#mic, +idle_inhibitor, tray) and custom exec modules? + +* Method +Two transient waybar instances against /tmp copies of the live config, captured +with grim (live bar briefly down, restored after). Variants in this dir: +- spike-style-csshide.css : option (c) — CSS-hide the native modules + (min-width:0; padding:0; margin:0; opacity:0) on #sysmonitor #pulseaudio + #idle_inhibitor. +- spike-config-collapsed.json : option (b) — modules-right rewritten to the base + set [tray, custom/date, custom/worldclock]. + +* Result +- *CSS-hide (option c): FAILS.* sysmonitor and pulseaudio rendered invisible but + held their space — a gap remained where they were, no reflow. GTK3 has no + =display:none=, and opacity/zero-size leaves the label's intrinsic width. The + right side ends up ragged and half-collapsed, not narrowed. Not viable for the + native modules. +- *Config-swap (option b): WORKS.* The collapsed config reflowed the right side + tight to tray + date, everything else fully gone, no gaps. Hides native and + custom modules alike. Tray icons survived the swap. + +* Decision +Mechanism is config-swap + =killall -SIGUSR2 waybar= (reload), NOT the state-file ++ CSS approach the original task leaned toward. The original "heavy" label on +option (b) is the cost of a full reload (brief flicker, module state resets, tray +re-registers) — acceptable, and the only approach that actually collapses a mixed +module set. + +* Implications for the spec +- Don't maintain two static configs (drift-prone). A toggle script rewrites the + active config's modules-left / modules-right between the full set and the base + set, then SIGUSR2. Base sets defined once; collapsed set is the base set, full + set is restored from the canonical module list. +- Per-side state in $XDG_RUNTIME_DIR; the arrow module reads it to pick its + direction. Arrow lives IN the base set (always visible, it's the expand control). +- Reload cost is per-toggle, not idle — fine for a click action. |
