docs(quickshell): audit performance budget
c940a8796b2b412f0f5de41bc3c59178d9bb5693
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 712ece9c31ef
bugabingas dorkfiles
c940a8796b2b412f0f5de41bc3c59178d9bb5693
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+113 / −6 text lines
+8 / −3 text lines
- 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`.- 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`.- `README.md` links the required inventories, service/parity contracts, smoke/audit/live-check gates, named config command, and IPC command form.- `live-check.sh` is executable and audited read-only: it must not link, start, stop, enable, disable, restart, or launch `qs -c nugu`.- `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.- every `transitional` external command is listed in `TRANSITIONS.md` with current role and removal gate; stale transition rows fail.- 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.- `ROLLOUT.md` must keep approval-only cutover, rollback, DBus, old-service, and final-completion boundaries visible.- `PERF.md` must document every current polling/action process budget and the future live performance evidence gate.- 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.- 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.required_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.shrequired_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.shexternal_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,wpctlrequired_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.shrequired_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.shnew file mode 100644+35 / −0 text lines
# Nugu Quickshell performance budgetThis file keeps the simplification goal honest before live rollout. The configshould prefer Quickshell services and event-driven refreshes; polling staysexplicit, slow enough for an X230-class laptop, and removable when a nativeservice path exists.## Budget inventory| Surface | Trigger | Budget decision | Replacement/removal gate || --- | --- | --- | --- || `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. || `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. || `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. || `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. || `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. || `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. || `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. || `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. || `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. || `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. || `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. || `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. |## Live perf gateBefore retiring Ironbar/Mako, record at least:```shps -o pid,comm,rss,pcpu,args -C qssystemctl --user status quickshell.service --no-pager```Compare against the current Ironbar/Mako baseline and keep screenshots beside thenumbers. Better performance is not accepted from code structure alone.+2 / −1 text lines
`PERF.md` inventories polling/action process budgets and the future live perf gate.future 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 methodfuture 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+68 / −2 text lines
required_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")required_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") 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"): 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"):perf_doc = config_dir / "PERF.md"perf_rows = []if perf_doc.exists(): perf_source = perf_doc.read_text() expected_perf_surfaces = { "CpuWidget.qml", "WifiWidget.qml", "BrightnessWidget.qml", "NotificationBridgeWidget.qml", "Osd.qml", "NotificationDaemon.qml", "InhibitWidget.qml", "ClipboardPicker.qml", "ClipboardWidget.qml", "PowerWidget.qml", "Commands.qml", "Theme.qml", } seen_perf = set() for number, line in enumerate(perf_source.splitlines(), 1): if not line.startswith("|") or "---" in line: continue cells = [cell.strip() for cell in line.strip().strip("|").split("|")] if not cells or cells[0] == "Surface": continue if len(cells) != 4: errors.append(f"PERF.md:{number}: perf row needs surface, trigger, budget decision, and gate columns") continue surface, trigger, decision, gate = cells match = re.fullmatch(r"`([^`]+)`", surface) if not match: errors.append(f"PERF.md:{number}: malformed perf surface {surface!r}") continue name = match.group(1) if name in seen_perf: errors.append(f"PERF.md:{number}: duplicate perf row {name!r}") seen_perf.add(name) if name.endswith(".qml") and not (config_dir / name).exists(): errors.append(f"PERF.md:{number}: references missing QML file {name}") for cell in (trigger, decision, gate): if len(cell) < 24: errors.append(f"PERF.md:{number}: thin perf text for {name!r}: {cell!r}") if re.search(r"\b(TODO|FIXME|XXX|HACK|stub|placeholder)\b", cell, re.I): errors.append(f"PERF.md:{number}: unresolved placeholder wording") perf_rows.append(cells) for name in sorted(expected_perf_surfaces - seen_perf): errors.append(f"PERF.md missing performance budget row {name}") for name in sorted(seen_perf - expected_perf_surfaces): errors.append(f"PERF.md contains stale or unaudited performance row {name}") required_perf_markers = ( "better performance is not accepted from code structure alone", "ps -o pid,comm,rss,pcpu,args -c qs", "systemctl --user status quickshell.service --no-pager", "compare against the current ironbar/mako baseline", "native notification history/actions replace mako", "remove `cliphist` bridge", ) perf_lower = perf_source.lower() for marker in required_perf_markers: if marker not in perf_lower: errors.append(f"PERF.md missing performance gate marker {marker!r}")else: errors.append("missing PERF.md")