repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

test(quickshell): capture theme smoke screenshots

3d61dd8c1ba34ab4ef26a50d24607914acf272f0

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (3)

+117 / −9 text lines

Diff layout

docs/super/inventory/2026-06-17-quickshell-theme-screenshot-smoke.md

Added
new file mode 100644

+75 / −0 text lines

1# Quickshell Nugu theme screenshot smoke
2
3Date: 2026-06-17
4
5## Scope
6
7Extend the existing self-contained scaffold smoke so dark/light diagnostics screenshots can be captured repeatably without linking live config or starting `quickshell.service`.
8
9No live services were started, stopped, enabled, disabled, linked, or retired.
11## Change
13`quickshell/nugu/smoke.sh` now:
15- starts with temporary `HOME` and `XDG_CONFIG_HOME`, preserving live `~/.config/quickshell` and live `~/.cache/nugu/mode`;
16- explicitly renders the scaffold in dark mode and light mode;
17- still verifies `setThemeMode auto` from the temp Nugu mode cache;
18- optionally captures cropped scaffold screenshots when `NUGU_QS_SMOKE_SCREENSHOT_DIR` is set;
19- crops only the focused monitor's top-left rollout region to avoid full-desktop screenshot leakage.
21## Commands
23Default gate:
25```sh
26cd /home/oli/Workspace/dotfiles
27quickshell/nugu/smoke.sh
28pgrep -a qs || true
29```
31Observed:
33```text
34PASS nugu quickshell scaffold smoke
35initial={"theme":"dark","diagnostics":false,"bar":false,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
36dark_open={"theme":"dark","diagnostics":true,"bar":true,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
37light_open={"theme":"light","diagnostics":true,"bar":true,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
38auto_light=light
39after_reload=dark
40hidden={"theme":"dark","diagnostics":false,"bar":false,"nativeNotifications":false,"launcher":false,"clipboardPicker":false,"powerMenu":false,"pendingPower":"","lastOsd":"","lastPower":""}
41smoke_exit=0
42--- lingering qs ---
43```
45Screenshot gate:
47```sh
48rm -rf /tmp/nugu-qs-theme-smoke
49NUGU_QS_SMOKE_SCREENSHOT_DIR=/tmp/nugu-qs-theme-smoke quickshell/nugu/smoke.sh
50ls -l /tmp/nugu-qs-theme-smoke
51pgrep -a qs || true
52```
54Observed:
56```text
57PASS nugu quickshell scaffold smoke
58screenshot_dark=/tmp/nugu-qs-theme-smoke/nugu-qs-dark.png
59screenshot_light=/tmp/nugu-qs-theme-smoke/nugu-qs-light.png
60smoke_exit=0
61--- screenshots ---
62-rw-r--r-- 1 oli oli 19695 Jun 17 05:58 nugu-qs-dark.png
63-rw-r--r-- 1 oli oli 19037 Jun 17 05:58 nugu-qs-light.png
64--- lingering qs ---
65```
67Cropped image inspection confirmed both screenshots show the Nugu Quickshell top bar plus Diagnostics swatches, with visible dark/light mode text.
69## Boundary
71This only closes repeatable scaffold/theme validation. It does not prove full companion parity:
73- `quickshell.service` remains inactive/not linked.
74- Ironbar and Mako remain the live services.
75- Hypr binds still point at old companion helpers until replacement IPC is live/recoverable and approved.

quickshell/nugu/README.md

Modified

+7 / −3 text lines

2323```sh
2424quickshell/nugu/smoke.sh
25NUGU_QS_SMOKE_SCREENSHOT_DIR=/tmp/nugu-qs-theme-smoke quickshell/nugu/smoke.sh
2526```
27The smoke runner creates a temporary `XDG_CONFIG_HOME`, symlinks only this config
28as `quickshell/nugu`, starts `qs -c nugu`, checks diagnostics/theme/hideAll IPC,
29and cleans up its own `qs` process.
28The smoke runner creates a temporary `HOME` and `XDG_CONFIG_HOME`, symlinks only
29this config as `quickshell/nugu`, starts `qs -c nugu`, checks
30Diagnostics/bar/theme/hideAll IPC, and cleans up its own `qs` process. When
31`NUGU_QS_SMOKE_SCREENSHOT_DIR` is set it saves cropped dark/light scaffold
32screenshots from the focused monitor; the crop is limited to the top-left rollout
33region to avoid full-desktop leakage.
3135Diagnostics:

quickshell/nugu/smoke.sh

Modified

+35 / −6 text lines

1414home_tmp=$tmp/home
1515log_out=${NUGU_QS_SMOKE_OUT:-/tmp/nugu-qs-smoke.out}
1616log_err=${NUGU_QS_SMOKE_ERR:-/tmp/nugu-qs-smoke.err}
17screenshot_dir=${NUGU_QS_SMOKE_SCREENSHOT_DIR:-}
1718qs_pid=
1920cleanup() {
4849 esac
52capture_screenshot() {
53 label=$1
54 [ -n "$screenshot_dir" ] || return 0
55 command -v grim >/dev/null 2>&1 || fail 'grim is required when NUGU_QS_SMOKE_SCREENSHOT_DIR is set'
56 mkdir -p "$screenshot_dir"
58 # Capture only the top-left scaffold region of the focused monitor. Full-screen
59 # screenshots risk leaking private desktop contents; this crop contains the
60 # Quickshell diagnostics swatches and rollout bar only.
61 geometry=$(hyprctl monitors -j | python -c 'import json, sys; monitors = json.load(sys.stdin); monitor = next((m for m in monitors if m.get("focused")), monitors[0]); x = int(monitor.get("x", 0)); y = int(monitor.get("y", 0)); w = min(460, int(monitor.get("width", 460))); h = min(170, int(monitor.get("height", 170))); print(f"{x},{y} {w}x{h}")')
62 grim -g "$geometry" "$screenshot_dir/nugu-qs-$label.png" || fail "screenshot failed for $label"
63}
5165mkdir -p "$tmp/quickshell" "$home_tmp/.cache/nugu"
5266printf 'dark' >"$home_tmp/.cache/nugu/mode"
5367ln -s "$config_dir" "$tmp/quickshell/nugu"
6781ipc showDiagnostics >/dev/null
6882ipc showBar >/dev/null
83mode_dark=$(ipc setThemeMode dark)
84state_dark_open=$(ipc scaffoldState)
85assert_contains "$mode_dark" 'dark' theme-dark
86assert_contains "$state_dark_open" '"theme":"dark"' dark-open-state
87assert_contains "$state_dark_open" '"diagnostics":true' dark-open-state
88assert_contains "$state_dark_open" '"bar":true' dark-open-state
89assert_contains "$state_dark_open" '"nativeNotifications":false' dark-open-state
90capture_screenshot dark
6992mode_light=$(ipc setThemeMode light)
70state_open=$(ipc scaffoldState)
93state_light_open=$(ipc scaffoldState)
7194assert_contains "$mode_light" 'light' theme-light
72assert_contains "$state_open" '"theme":"light"' open-state
73assert_contains "$state_open" '"diagnostics":true' open-state
74assert_contains "$state_open" '"bar":true' open-state
75assert_contains "$state_open" '"nativeNotifications":false' open-state
95assert_contains "$state_light_open" '"theme":"light"' light-open-state
96assert_contains "$state_light_open" '"diagnostics":true' light-open-state
97assert_contains "$state_light_open" '"bar":true' light-open-state
98assert_contains "$state_light_open" '"nativeNotifications":false' light-open-state
99capture_screenshot light
77101printf 'light' >"$home_tmp/.cache/nugu/mode"
78102mode_auto_light=$(ipc setThemeMode auto)
102126printf 'PASS nugu quickshell scaffold smoke\n'
103127printf 'initial=%s\n' "$state_initial"
104printf 'open=%s\n' "$state_open"
128printf 'dark_open=%s\n' "$state_dark_open"
129printf 'light_open=%s\n' "$state_light_open"
105130printf 'auto_light=%s\n' "$mode_auto_light"
106131printf 'after_reload=%s\n' "$mode_after_reload"
107132printf 'hidden=%s\n' "$state_hidden"
133if [ -n "$screenshot_dir" ]; then
134 printf 'screenshot_dark=%s\n' "$screenshot_dir/nugu-qs-dark.png"
135 printf 'screenshot_light=%s\n' "$screenshot_dir/nugu-qs-light.png"
136fi