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

@@ -26,15 +26,6 @@ next, in what order*.
## NEXT
### 12. Screen recording in the Capture submenu
New; screenshots ship, recording doesn't — a standard workstation need.
Extend `nomarchy-menu capture`: record region/full → `wl-screenrec`
(fallback `wf-recorder`), saved next to Screenshots, with a self-gating
Waybar recording indicator that stops the recording on click (the only
sane "stop" surface). Optional audio toggle. Parity rule applies.
**Verify:** V1 + `bash -n`; V2 headless if the software-GL recipe
supports it, else V3 queue.
### 13. Small niceties batch (one slice per iteration)
Each is a small, self-contained polish item in the existing patterns:
- **Idle-inhibit (caffeine) toggle:** Waybar `idle_inhibitor` module
@@ -106,7 +97,8 @@ earns ≥3 entries — keep the root at six.
- **Per-theme icon overrides** / more icon packs (ROADMAP § Icon themes).
- **MIPI/IPU software-ISP camera** support (no-UVC machines).
- **OCR screenshot-to-text**: a Capture entry (grim region → tesseract
→ clipboard) — cheap once recording (#12) reshapes the submenu.
→ clipboard) — recording (#12, shipped 2026-07-04) already reshaped
the submenu, so this is now a two-row addition.
- **Doctor Waybar warning**: a self-gating bar indicator fed by
`nomarchy-doctor` (shipped 2026-07-04) — appears only when the sheet
has a ✖; click opens the sheet.

View File

@@ -86,6 +86,15 @@ QA machine), the **T14s** (webcam case).
`sudo nomarchy-snapshots`, restore a single file (`undochange`)
and walk a root-config rollback up to (or through) the
typed-`yes` gate.
- [ ] **Screen recording (item 12)** — Tools Capture: Record region
(slurp) and Record screen produce a playable .mp4 in
~/Videos/Recordings; the red ⏺ REC appears in the bar instantly
and CLICKING IT stops + notifies the path; the + audio variants
carry sound. While recording, the Capture menu offers only
"■ Stop recording". On the AMD box wl-screenrec (VAAPI) should
do the work; if it dies at start the wf-recorder fallback kicks
in silently — check the notification says which. Summer bars
have the same ⏺ (parity).
- [ ] **Doctor (item 10)** — menu System Doctor opens the sheet in
a terminal; `nomarchy-doctor` over SSH shows the same minus user
units. On a healthy machine everything is ✔/ (dev-box run

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.