Files
enricobuehler b8720e5e4a The Omarchy box says otherwise: five things the plan got wrong, measured
WP0 + S2 run against a real Omarchy 4.0.1 box (Hyprland 0.56.2, Quickshell 0.3.1, RTX 5070 Ti).
Everything below is a measurement, not a re-reading of the docs.

Fixed, each one a first-run defect
----------------------------------
1. **The install line could not work.** Omarchy ships a libalpm PreTransaction hook
   (00-omarchy-update-guard) that aborts any transaction whose pacman invocation carries BOTH
   -S and -u, to funnel upgrades through `omarchy update`. So the Arch line this branch shipped
   for Omarchy — `pacman -Syu <pkgs>` — dies with "Woah partner..." and installs NOTHING. Seen
   in /var/log/pacman.log, then confirmed the other way: `pacman -Sy` + `pacman -S <pkgs>`
   installs all three cleanly. platforms.json, the docs page and install.sh now split the two,
   and plain Arch keeps its full -Syu (a partial upgrade against a ROLLING repo is what breaks
   those boxes; Omarchy's frozen snapshot mirror is exactly why it does not break here).

2. **The idle guard never restored anything.** `omarchy-toggle-idle status` prints JSON, not a
   keyword — and the payload is a trap: its tooltip names the action the button WOULD take, so
   the string "Stay Awake" appears precisely when stay-awake is OFF. The old case-glob matched
   neither that nor the words it was looking for, so every arm fell through to "do nothing" and
   the box stayed awake after every session. Now reads `"enabled":true`. Verified both ways on
   the real tool: a user's own stay-awake survives a stream, one we set is undone.

3. **`status` lied twice.** It reported "no punktfunk rules" seconds after adding six of them
   (a failed `sudo -n` read was being treated as proof of absence), and reported xdph missing on
   a box that was capturing through it — `pgrep -x` can never match `xdg-desktop-portal-hyprland`
   because Linux truncates comm to 15 characters, and pgrep says so on a stderr the check threw
   away. Now: never claim absence from a failed read, and ask systemd about the portal.

4. **D3's premise is only half true.** Omarchy ships TWO session entries. On `hyprland-uwsm`
   graphical-session.target starts; on plain `hyprland` it never does — measured, and Omarchy's
   OWN units that want it (omarchy-crash-watch, omarchy-sleep-lock) sit enabled-and-dead there
   too. The drop-in is additive so autostart still works either way, but "restarts with your
   session" was a promise we could not keep. setup and status now detect and say which it is,
   and the docs explain when switching sessions is worth it (rarely: the host re-derives the
   live compositor per connect).

5. **`ctl watch` leaked a stream per dead consumer.** A watcher only ever READS, so when the
   widget died its end of our stdout pipe closed unnoticed: six orphans accumulated across three
   shell restarts on a host with no events at all. The SSE keep-alive now surfaces as a
   `ctl.heartbeat` line, which gives us a write to fail on, and a failed write ends the process.
   Verified with its control: dies ~13s after its reader goes, survives 50s while the reader lives.

Confirmed as designed
---------------------
* **D6 end to end.** The box's xdph.conf is exactly the shape the fix targets. A real capture
  (xdph → PipeWire 1920x1080 → cuda-import → nvenc) installed the shim, the shim picked up
  `hyprland-preview-share-picker` as its fallback automatically, the restore fired on teardown,
  and the file came back byte-identical with no marker left. The landmine is defused.
* **The pin correction.** The mgmt port serves 306d95… = native-cert.pem; cert.pem is 34a4cb…,
  a different certificate entirely. Pinning cert.pem as the plan said would have exited 4 on
  every healthy host. All four exit codes exercised on glass — 4 by pointing ctl at the host's
  own legacy cert, which is a valid certificate that simply is not the one mgmt serves.
* **R1 and R3 closed.** Our soname depends (libavcodec.so=63-64 …) match the frozen snapshot
  mirror's ffmpeg 9.0.1 exactly, and /etc/pacman.conf is owned by pacman, not omarchy-settings,
  so our repo stanza is not clobbered. R4 closed by (1); R7 closed — enforce_permissions is off
  as shipped.
* The tree builds on Omarchy in 8m16s against the snapshot's toolchain (rustc 1.98).

Gates: fmt, clippy -D warnings, 13 ctl tests, docs-drift, shellcheck, 8 shell self-checks.
2026-08-28 20:14:00 +02:00
..