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

@@ -49,6 +49,7 @@ window#waybar {
#backlight,
#tray,
#custom-nomarchy,
#custom-recording,
#clock,
#clock.date,
#workspaces,
@@ -133,3 +134,8 @@ window#waybar {
padding-right: 10px;
font-size: 20px;
}
/* Recording in progress: alert red; the module is also the stop button. */
#custom-recording.recording {
color: @red;
}

View File

@@ -11,7 +11,7 @@
"modules-left": ["custom/nomarchy", "clock", "clock#date"],
"modules-center": ["hyprland/workspaces"],
"modules-right": ["idle_inhibitor", "pulseaudio", "custom/powerprofile", "custom/nightlight", "hyprland/language", "custom/updates", "battery", "tray", "custom/vpn", "custom/notification", "custom/powermenu"],
"modules-right": ["custom/recording", "idle_inhibitor", "pulseaudio", "custom/powerprofile", "custom/nightlight", "hyprland/language", "custom/updates", "battery", "tray", "custom/vpn", "custom/notification", "custom/powermenu"],
"hyprland/workspaces": {
"disable-scroll": true,
@@ -86,6 +86,14 @@
"on-click": "nomarchy-powerprofile-cycle"
},
"custom/recording": {
"return-type": "json",
"interval": 10,
"signal": 8,
"exec": "nomarchy-record status",
"on-click": "nomarchy-record stop"
},
"custom/vpn": {
"return-type": "json",
"interval": 5,