dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search test(quickshell): compare theme screenshots
392a2efaca068dd6044620e76a1973dcd295f530
Oliver Jan Krylow <oliver@bugabinga.net > · 17 Jun 2026
unsigned
Browse files Compare with HEAD
Changed files (3) docs/super/inventory/2026-06-17-quickshell-theme-screenshot-smoke.md Modified 23 23 - applies watched mode changes from `FileView.onLoaded`, not directly from `onFileChanged`, because a minimal probe showed `text()` can still contain the old file content inside `onFileChanged` immediately after `reload()`;
24 24 - optionally captures cropped scaffold screenshots when `NUGU_QS_SMOKE_SCREENSHOT_DIR` is set;
25 25 - fails if either requested screenshot is empty;
26 + - fails if the dark and light screenshots are byte-identical;
26 27 - crops only the focused monitor's top-left rollout region to avoid full-desktop screenshot leakage.
77 78 rm -rf /tmp/nugu-qs-theme-smoke
78 79 NUGU_QS_SMOKE_SCREENSHOT_DIR=/tmp/nugu-qs-theme-smoke quickshell/nugu/smoke.sh
79 80 ls -l /tmp/nugu-qs-theme-smoke
81 + cmp -s /tmp/nugu-qs-theme-smoke/nugu-qs-dark.png /tmp/nugu-qs-theme-smoke/nugu-qs-light.png; echo "cmp_exit=$?"
80 82 pgrep -a qs || true
100 102 screenshot_light=/tmp/nugu-qs-theme-smoke/nugu-qs-light.png
102 104 --- screenshots ---
103 - -rw-r--r-- 1 oli oli 24828 Jun 17 06:18 nugu-qs-dark.png
104 - -rw-r--r-- 1 oli oli 23693 Jun 17 06:18 nugu-qs-light.png
105 + -rw-r--r-- 1 oli oli 26554 Jun 17 06:57 nugu-qs-dark.png
106 + -rw-r--r-- 1 oli oli 25201 Jun 17 06:57 nugu-qs-light.png
107 + --- screenshot cmp ---
105 109 --- lingering qs ---
quickshell/nugu/README.md Modified 46 46 this config as `quickshell/nugu`, runs the audit, starts `qs -c nugu`, checks
47 47 Diagnostics/bar/theme/hideAll IPC, and cleans up its own `qs` process. When
48 48 `NUGU_QS_SMOKE_SCREENSHOT_DIR` is set it saves cropped, non-empty dark/light
49 - scaffold screenshots from the focused monitor; the crop is limited to the
50 - top-left rollout region to avoid full-desktop leakage.
49 + scaffold screenshots from the focused monitor and fails if they are identical;
50 + the crop is limited to the top-left rollout region to avoid full-desktop leakage.
quickshell/nugu/smoke.sh Modified 173 173 assert_contains
"$state_light_open" '"nativeNotifications":false' light-open-state
174 174 assert_theme_state light preview
"$theme_light_state" light-theme-state
175 175 capture_screenshot light
176 + if [ -n
"$screenshot_dir" ] && cmp -s
"$screenshot_dir/nugu-qs-dark.png" "$screenshot_dir/nugu-qs-light.png" ; then 177 + fail
'dark and light screenshots are identical' 177 180 printf 'light' > "$home_tmp/.cache/nugu/mode" 178 181 mode_auto_request
= $(ipc setThemeMode auto)