dotfiles
bugabingas dorkfiles
owned by bugabinga
test(quickshell): audit self-contained config
9904fafdc834dd1696a4f62ccc9cbf14aaeaeead
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (8)
docs/super/inventory/2026-06-17-quickshell-self-contained-audit.md
Addednew file mode 100644 1 +#
Quickshell self-contained audit verification 7 +Add and verify a static guard for the self-contained documented Nugu Quickshell config.
9 +No live links, user services, Ironbar, Mako, Hyprland binds, or `~/.config/quickshell` were changed.
11 +##
What the audit checks 13 +`quickshell/nugu/audit.sh` checks repository state only:
15 +- QML imports are limited to Qt, Quickshell, and local `import "."`.
16 +- Every QML component has an early decision comment.
17 +- `quickshell/nugu/nugu.json` exists and matches `hypr/generated/nugu.json`.
18 +- executable code does not call retired companion app markers:
22 +- transitional bridges are explicitly reported as warnings, not hidden:
26 +These warnings are expected during rollout and must disappear before final companion retirement.
31 +cd /home/oli/Workspace/dotfiles
32 +quickshell/nugu/audit.sh
33 +sh -n quickshell/nugu/smoke.sh
34 +quickshell/nugu/smoke.sh
41 +PASS nugu quickshell audit
43 +WARN transitional external bridge still present: cliphist
44 +WARN transitional external bridge still present: makoctl
45 +PASS nugu quickshell scaffold smoke
46 +PASS nugu quickshell audit
48 +WARN transitional external bridge still present: cliphist
49 +WARN transitional external bridge still present: makoctl
54 +The smoke runner now executes the audit before launching `qs -c nugu` with temporary `HOME` and `XDG_CONFIG_HOME`.
58 +This improves the self-contained documented config gate only. Overall companion parity remains incomplete:
60 +- `quickshell.service` is still not live.
61 +- Ironbar and Mako remain active.
62 +- `cliphist` and `makoctl` are still known transitional bridges.
63 +- Hypr binds are not simplified until replacement IPC is proven live and approved.
quickshell/nugu/CalendarPopup.qml
Modified 8 11 required property QtObject theme
9 12 required property
var barWindow
10 13 required property
var anchorItem
quickshell/nugu/ClipboardWidget.qml
Modified 10 13 required property QtObject theme
11 14 required property QtObject commands
12 15 required property
var barWindow
quickshell/nugu/InhibitWidget.qml
Modified10 13 property bool
inhibiting:
false 11 14 property int
durationIndex:
3 12 15 readonly property
var durations: [
quickshell/nugu/PowerWidget.qml
Modified10 13 required property QtObject theme
11 14 required property QtObject commands
12 15 required property
var barWindow
quickshell/nugu/README.md
Modified 21 -Run the self-contained scaffold smoke without touching live links/services:
21 +Run static self-contained checks and scaffold smoke without touching live links/services:
24 +quickshell/nugu/audit.sh
24 25 quickshell/nugu/smoke.sh
25 26 NUGU_QS_SMOKE_SCREENSHOT_DIR=/tmp/nugu-qs-theme-smoke quickshell/nugu/smoke.sh
29 +The audit checks that QML imports stay local/Qt/Quickshell, every component has
30 +an early decision comment, the bundled palette matches `hypr/generated/nugu.json`,
31 +and retired companion launchers are not executable dependencies. It intentionally
32 +warns while transitional `cliphist` and `makoctl` bridges remain; those warnings
33 +must disappear before final retirement.
28 35 The smoke runner creates a temporary `HOME` and `XDG_CONFIG_HOME`, symlinks only
29 -this config as `quickshell/nugu`, verifies the copied palette still matches
30 -`hypr/generated/nugu.json`, starts `qs -c nugu`, checks
36 +this config as `quickshell/nugu`, runs the audit, starts `qs -c nugu`, checks
31 37 Diagnostics/bar/theme/hideAll IPC, and cleans up its own `qs` process. When
32 38 `NUGU_QS_SMOKE_SCREENSHOT_DIR` is set it saves cropped dark/light scaffold
33 39 screenshots from the focused monitor; the crop is limited to the top-left rollout
quickshell/nugu/audit.sh
Addednew file mode 100755 7 +config_dir
=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) 8 +repo_dir
=$(CDPATH= cd -- "$config_dir/../.." && pwd -P) 10 +python -
"$config_dir" "$repo_dir" <<'PY' 11 +from pathlib import Path 15 +config_dir = Path(sys.argv[1]) 16 +repo_dir = Path(sys.argv[2]) 19 +qml_files = sorted(config_dir.glob("*.qml")) 22 + errors.append("no QML files found") 24 +allowed_imports = ("QtQuick", "Quickshell") 25 +for path in qml_files: 26 + text = path.read_text() 27 + rel = path.relative_to(config_dir) 28 + lines = text.splitlines() 30 + for number, line in enumerate(lines, 1): 31 + stripped = line.strip() 32 + if not stripped.startswith("import "): 34 + target = stripped.split(maxsplit=1)[1] 37 + if target.startswith(allowed_imports): 39 + errors.append(f"{rel}:{number}: non-self-contained import {target}") 42 + if not any(line.strip().startswith("//") for line in early): 43 + errors.append(f"{rel}: missing early decision comment") 47 + code_lines.append(line.split("//", 1)[0]) 48 + code = "\n".join(code_lines) 49 + for forbidden in ("hyprlauncher", "hyprshutdown", "hyprctl notify"): 50 + if forbidden in code: 51 + errors.append(f"{rel}: executable dependency on retired companion marker {forbidden!r}") 53 +palette = config_dir / "nugu.json" 54 +generated = repo_dir / "hypr" / "generated" / "nugu.json" 55 +if not palette.exists(): 56 + errors.append("missing bundled nugu.json") 57 +elif generated.exists() and palette.read_text() != generated.read_text(): 58 + errors.append("quickshell/nugu/nugu.json differs from hypr/generated/nugu.json") 60 +# These are known transitional bridges, not hidden dependencies. Keep them 61 +# visible so they cannot be mistaken for final parity. 62 +all_code = "\n".join(p.read_text() for p in qml_files) 63 +for command in ("cliphist", "makoctl"): 64 + if command in all_code: 65 + warnings.append(f"transitional external bridge still present: {command}") 68 + print("FAIL nugu quickshell audit") 69 + for error in errors: 70 + print(f"ERROR {error}") 71 + for warning in warnings: 72 + print(f"WARN {warning}") 75 +print("PASS nugu quickshell audit") 76 +print(f"qml_files={len(qml_files)}") 77 +for warning in warnings: 78 + print(f"WARN {warning}") quickshell/nugu/smoke.sh
Modified138 -if ! cmp -s
"$config_dir/nugu.json" "$repo_dir/hypr/generated/nugu.json"; then 139 - fail
'quickshell/nugu/nugu.json differs from hypr/generated/nugu.json' 136 +audit_output
=$("$config_dir/audit.sh") || fail
'static Quickshell audit failed' 143 139 HOME
="$home_tmp" XDG_CONFIG_HOME
="$tmp" QS_NO_RELOAD_POPUP
=1 qs -c nugu
>"$log_out" 2>"$log_err" & 235 231 printf 'PASS nugu quickshell scaffold smoke\n' 232 +printf '%s\n' "$audit_output" 236 233 printf 'initial=%s\n' "$state_initial" 237 234 printf 'dark_open=%s\n' "$state_dark_open" 238 235 printf 'dark_theme_state=%s\n' "$theme_dark_state"