feat(capture): screen recording — menu start, bar-click stop (item 12)
All checks were successful
Check / eval (push) Successful in 2m56s

nomarchy-record owns the lifecycle: start prefers wl-screenrec (VAAPI
hardware encode) and falls back to wf-recorder if it dies at startup
(the no-VAAPI case), stop SIGINTs so the file finalizes cleanly, and
status feeds a self-gating Waybar ⏺ REC (alert red) whose click is
the one stop surface — signal 8 pokes make it appear/vanish
instantly. Capture gains Record region/screen (+ audio variants) and
self-swaps to '■ Stop recording' while one runs. Parity: both summer
whole-swap bars carry the same module. Recordings land in
~/Videos/Recordings with the screenshot timestamp naming (deviation
from 'next to Screenshots': an .mp4 in Pictures felt wrong).

V1: rendered bar config + CSS asserted, summer jsonc parse, recorder
dry-run state machine correct (idle/active/usage exits), both
recorders in home-path. Real capture needs a session → V3 queued
(incl. the VAAPI-vs-fallback check on the AMD box).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-07-04 20:58:40 +01:00
parent bfb80cb60d
commit 0fe46221ea
11 changed files with 198 additions and 14 deletions

View File

@@ -17,6 +17,28 @@ Template:
---
## 2026-07-04 — screen recording in Capture (iteration #22, item 12)
- **Task:** BACKLOG NEXT#12 — record region/screen from the menu, stop
from the bar.
- **Did:** modules/home/recording.nix: `nomarchy-record`
start/stop/active/status — wl-screenrec first, wf-recorder fallback
if it dies at startup (no-VAAPI case), SIGINT-finalized stop,
runtime pidfile, signal-8 bar pokes. Capture menu: 4 record rows that
self-swap to "■ Stop recording" while one runs. Waybar: self-gating
custom/recording (⏺ REC, @bad red), click = stop — the one stop
surface. Parity: both summer whole-swap bars got the module + CSS
(@red). DEVIATIONS: saves to ~/Videos/Recordings (an .mp4 in
Pictures/Screenshots felt wrong — same timestamp naming though);
audio = two extra explicit rows, not a toggle state.
- **Verified:** V0; V1 — template-home builds; rendered bar config has
the module (first in modules-right) + CSS rule; summer jsonc still
parse; nomarchy-record dry-run: status empty+exit 0 idle, active
exit 1, usage exit 2; both recorders in home-path. Real capture
needs a session → V3 (headless GL recipe can't confirm an encoder).
- **Pending:** V3 recording exercise (incl. VAAPI-vs-fallback check).
- **Next suggestion:** NEXT#13 niceties, one slice: idle-inhibit
(caffeine) toggle — reverse-parity gap already noted in the item.
## 2026-07-04 — state-file validation & friendly errors (iteration #21, item 11)
- **Task:** BACKLOG NEXT#11 — hand-edited state must fail with field +
problem + fix, never a Nix stack.