repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

docs(quickshell): audit performance budget

c940a8796b2b412f0f5de41bc3c59178d9bb5693

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (4)

+113 / −6 text lines

Diff layout

docs/super/inventory/2026-06-17-quickshell-self-contained-audit.md

Modified

+8 / −3 text lines

1313`quickshell/nugu/audit.sh` checks repository state only:
15- required named-config files are present: `shell.qml`, `Theme.qml`, `nugu.json`, `README.md`, `COMPONENTS.md`, `IPC.md`, `EXTERNALS.md`, `TRANSITIONS.md`, `SERVICE.md`, `PARITY.md`, `HYPR_MIGRATION.md`, `ROLLOUT.md`, `audit.sh`, `smoke.sh`, `live-check.sh`.
15- required named-config files are present: `shell.qml`, `Theme.qml`, `nugu.json`, `README.md`, `COMPONENTS.md`, `IPC.md`, `EXTERNALS.md`, `TRANSITIONS.md`, `SERVICE.md`, `PARITY.md`, `HYPR_MIGRATION.md`, `ROLLOUT.md`, `PERF.md`, `audit.sh`, `smoke.sh`, `live-check.sh`.
1616- `README.md` links the required inventories, service/parity contracts, smoke/audit/live-check gates, named config command, and IPC command form.
1717- `live-check.sh` is executable and audited read-only: it must not link, start, stop, enable, disable, restart, or launch `qs -c nugu`.
1818- `smoke.sh` is executable and audited for self-contained temp `HOME`/`XDG_CONFIG_HOME`, named config launch, launcher/clipboard/power/native-notification/OSD IPC probes, cleanup trap, and no live link/service mutation.
2323- every `transitional` external command is listed in `TRANSITIONS.md` with current role and removal gate; stale transition rows fail.
2424- future service rollout is documented in `SERVICE.md`; `hypr/systemd/quickshell.service` must start `qs -c nugu`, and `x230.symlinks` must link both config and service.
2525- `ROLLOUT.md` must keep approval-only cutover, rollback, DBus, old-service, and final-completion boundaries visible.
26- `PERF.md` must document every current polling/action process budget and the future live performance evidence gate.
2627- replacement scope is documented in `PARITY.md`, including old companion retirement targets, non-thin row statuses/gates, valid QML replacement references, human approval, and the explicit “not complete / old tools remain authoritative” boundary.
2728- Hypr simplification is documented in `HYPR_MIGRATION.md`; rows must cover old helper markers from the current Hypr modules and point only at existing `nugu` IPC methods.
2829- QML imports are limited to Qt, Quickshell, and local `import "."`.
7677service_contract=ok
7778parity_matrix=ok
7879parity_rows=12
80perf_rows=12
81perf_budget=ok
7982rollout_runbook=ok
8083hypr_migration_rows=21
8184hypr_current_refs=8
8386rollout_boundary=ok
8487contrast_pairs=12
8588contrast_min=5.50
86required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,audit.sh,smoke.sh,live-check.sh
89required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,PERF.md,audit.sh,smoke.sh,live-check.sh
8790external_commands=awk,brightnessctl,cliphist,cut,grep,head,hyprctl,hyprlock,hyprpicker,hyprshot,iwctl,loginctl,makoctl,nu,playerctl,satty,sed,sh,systemctl,upower,uptime,uwsm,wezterm,wl-copy,wpctl
8891WARN transitional external bridge still present: cliphist
8992WARN transitional external bridge still present: makoctl
106109service_contract=ok
107110parity_matrix=ok
108111parity_rows=12
112perf_rows=12
113perf_budget=ok
109114rollout_runbook=ok
110115hypr_migration_rows=21
111116hypr_current_refs=8
113118rollout_boundary=ok
114119contrast_pairs=12
115120contrast_min=5.50
116required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,audit.sh,smoke.sh,live-check.sh
121required_files=shell.qml,Theme.qml,nugu.json,README.md,COMPONENTS.md,IPC.md,EXTERNALS.md,TRANSITIONS.md,SERVICE.md,PARITY.md,HYPR_MIGRATION.md,ROLLOUT.md,PERF.md,audit.sh,smoke.sh,live-check.sh
117122external_commands=awk,brightnessctl,cliphist,cut,grep,head,hyprctl,hyprlock,hyprpicker,hyprshot,iwctl,loginctl,makoctl,nu,playerctl,satty,sed,sh,systemctl,upower,uptime,uwsm,wezterm,wl-copy,wpctl
118123WARN transitional external bridge still present: cliphist
119124WARN transitional external bridge still present: makoctl

quickshell/nugu/PERF.md

Added
new file mode 100644

+35 / −0 text lines

1# Nugu Quickshell performance budget
2
3This file keeps the simplification goal honest before live rollout. The config
4should prefer Quickshell services and event-driven refreshes; polling stays
5explicit, slow enough for an X230-class laptop, and removable when a native
6service path exists.
7
8## Budget inventory
9
10| Surface | Trigger | Budget decision | Replacement/removal gate |
11| --- | --- | --- | --- |
12| `CpuWidget.qml` | repeating `Timer` every `2000` ms | `/proc/stat` polling is tiny and avoids spawning heavyweight monitors in the bar. | Keep only if CPU display remains useful after live perf review. |
13| `WifiWidget.qml` | `Timer` every `30000` ms | iwd status is slow-moving, so thirty seconds avoids chatty shelling while preserving current bar parity. | Replace with a native iwd/DBus service if Quickshell gains one or live latency is unacceptable. |
14| `BrightnessWidget.qml` | `Timer` every `10000` ms | Backlight can change outside Quickshell, so ten-second status repair balances correctness and low wakeups. | Replace with evented brightness state if a reliable backend is added. |
15| `NotificationBridgeWidget.qml` | repeating `Timer` every `5000` ms | Mako count polling is temporary and visible so the bridge cannot hide inside the bar forever. | Remove when native notification history/actions replace Mako. |
16| `Osd.qml` | one-shot `Timer` at `1400` ms | OSD hide timeout is short-lived after explicit user action, not background polling. | Keep unless visual approval asks for a different timeout. |
17| `NotificationDaemon.qml` | per-notification one-shot `Timer` from notification timeout | Native notification expiry mirrors daemon semantics and only exists while notifications are tracked. | Keep after notification parity if timeout behavior is accepted. |
18| `InhibitWidget.qml` | user-selected one-shot `Timer` | Manual keep-awake expiry is user-triggered and prevents stale indefinite inhibits. | Keep unless inhibit UX changes during live validation. |
19| `ClipboardPicker.qml` | on-open `Process` refresh | Clipboard search pays `cliphist` cost only when the picker opens. | Remove `cliphist` bridge when clipboard storage replacement is approved. |
20| `ClipboardWidget.qml` | on-open `Process` refresh | Bar clipboard preview avoids background polling and updates only when asked. | Remove `cliphist` bridge when clipboard storage replacement is approved. |
21| `PowerWidget.qml` | on-open `Process` refresh | Uptime is decorative, so it refreshes only when the power popup opens. | Drop the uptime line if live review finds the process cost not worth it. |
22| `Commands.qml` | action-only `Process` launches | Audio, media, capture, color, lock, and power commands run only after explicit IPC/click/key action. | Shrink commands as native services or approved retained backends replace shell snippets. |
23| `Theme.qml` | evented file-watch reload | Dark/light auto mode follows the Nugu cache file without polling. | Keep; it is the required Nugu integration point. |
25## Live perf gate
27Before retiring Ironbar/Mako, record at least:
29```sh
30ps -o pid,comm,rss,pcpu,args -C qs
31systemctl --user status quickshell.service --no-pager
32```
34Compare against the current Ironbar/Mako baseline and keep screenshots beside the
35numbers. Better performance is not accepted from code structure alone.

quickshell/nugu/README.md

Modified

+2 / −1 text lines

3333inventories temporary bridge commands and removal gates. `SERVICE.md`
3434documents the future user-service rollout contract without activating it.
3535`ROLLOUT.md` documents the approval-only cutover and rollback sequence.
36`PERF.md` inventories polling/action process budgets and the future live perf gate.
3637`PARITY.md` maps current companion apps/tools to their Quickshell replacements
3738and retirement gates. `HYPR_MIGRATION.md` maps current Hypr binds/helpers to
38future Quickshell IPC targets. `live-check.sh` reports final rollout blockers, including old Hypr companion refs, without mutating live services or links. The audit checks that required named-config files are present, the rollout runbook keeps approval/rollback boundaries visible, every QML component and IPC method
39future Quickshell IPC targets. `live-check.sh` reports final rollout blockers, including old Hypr companion refs, without mutating live services or links. The audit checks that required named-config files are present, the rollout runbook keeps approval/rollback boundaries visible, the performance budget documents every polling/action boundary, every QML component and IPC method
3940are documented with non-thin inventory rows, QML imports stay local/Qt/Quickshell, every component has an
4041early decision/why comment, QML has no unresolved TODO/stub comments, local resources
4142are audited, the bundled palette matches

quickshell/nugu/audit.sh

Modified

+68 / −2 text lines

2121qml_files = sorted(config_dir.glob("*.qml"))
2222code_by_file = {}
2323decision_comment_files = set()
24required_files = ("shell.qml", "Theme.qml", "nugu.json", "README.md", "COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "audit.sh", "smoke.sh", "live-check.sh")
24required_files = ("shell.qml", "Theme.qml", "nugu.json", "README.md", "COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "PERF.md", "audit.sh", "smoke.sh", "live-check.sh")
2626for name in required_files:
2727 if not (config_dir / name).exists():
8181readme_path = config_dir / "README.md"
8282if readme_path.exists():
8383 readme_text = readme_path.read_text()
84 for marker in ("COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "audit.sh", "smoke.sh", "live-check.sh", "qs -c nugu", "qs ipc -c nugu"):
84 for marker in ("COMPONENTS.md", "IPC.md", "EXTERNALS.md", "TRANSITIONS.md", "SERVICE.md", "PARITY.md", "HYPR_MIGRATION.md", "ROLLOUT.md", "PERF.md", "audit.sh", "smoke.sh", "live-check.sh", "qs -c nugu", "qs ipc -c nugu"):
8585 if marker not in readme_text:
8686 errors.append(f"README.md missing self-contained entry marker {marker!r}")
8787else:
283283else:
284284 errors.append("missing x230.symlinks")
286perf_doc = config_dir / "PERF.md"
287perf_rows = []
288if perf_doc.exists():
289 perf_source = perf_doc.read_text()
290 expected_perf_surfaces = {
291 "CpuWidget.qml",
292 "WifiWidget.qml",
293 "BrightnessWidget.qml",
294 "NotificationBridgeWidget.qml",
295 "Osd.qml",
296 "NotificationDaemon.qml",
297 "InhibitWidget.qml",
298 "ClipboardPicker.qml",
299 "ClipboardWidget.qml",
300 "PowerWidget.qml",
301 "Commands.qml",
302 "Theme.qml",
303 }
304 seen_perf = set()
305 for number, line in enumerate(perf_source.splitlines(), 1):
306 if not line.startswith("|") or "---" in line:
307 continue
308 cells = [cell.strip() for cell in line.strip().strip("|").split("|")]
309 if not cells or cells[0] == "Surface":
310 continue
311 if len(cells) != 4:
312 errors.append(f"PERF.md:{number}: perf row needs surface, trigger, budget decision, and gate columns")
313 continue
314 surface, trigger, decision, gate = cells
315 match = re.fullmatch(r"`([^`]+)`", surface)
316 if not match:
317 errors.append(f"PERF.md:{number}: malformed perf surface {surface!r}")
318 continue
319 name = match.group(1)
320 if name in seen_perf:
321 errors.append(f"PERF.md:{number}: duplicate perf row {name!r}")
322 seen_perf.add(name)
323 if name.endswith(".qml") and not (config_dir / name).exists():
324 errors.append(f"PERF.md:{number}: references missing QML file {name}")
325 for cell in (trigger, decision, gate):
326 if len(cell) < 24:
327 errors.append(f"PERF.md:{number}: thin perf text for {name!r}: {cell!r}")
328 if re.search(r"\b(TODO|FIXME|XXX|HACK|stub|placeholder)\b", cell, re.I):
329 errors.append(f"PERF.md:{number}: unresolved placeholder wording")
330 perf_rows.append(cells)
331 for name in sorted(expected_perf_surfaces - seen_perf):
332 errors.append(f"PERF.md missing performance budget row {name}")
333 for name in sorted(seen_perf - expected_perf_surfaces):
334 errors.append(f"PERF.md contains stale or unaudited performance row {name}")
335 required_perf_markers = (
336 "better performance is not accepted from code structure alone",
337 "ps -o pid,comm,rss,pcpu,args -c qs",
338 "systemctl --user status quickshell.service --no-pager",
339 "compare against the current ironbar/mako baseline",
340 "native notification history/actions replace mako",
341 "remove `cliphist` bridge",
342 )
343 perf_lower = perf_source.lower()
344 for marker in required_perf_markers:
345 if marker not in perf_lower:
346 errors.append(f"PERF.md missing performance gate marker {marker!r}")
347else:
348 errors.append("missing PERF.md")
286350parity_doc = config_dir / "PARITY.md"
287351parity_rows = []
288352if parity_doc.exists():
538602print("service_contract=ok")
539603print("parity_matrix=ok")
540604print(f"parity_rows={len(parity_rows)}")
605print(f"perf_rows={len(perf_rows)}")
606print("perf_budget=ok")
541607print("rollout_runbook=ok")
542608print(f"hypr_migration_rows={len(hypr_migration_rows)}")
543609print(f"hypr_current_refs={len(hypr_current_refs)}")