feat(desktop): add screen recording (task 0029) #21

Merged
alexion merged 2 commits from task-0029-screen-recording into main 2026-07-22 23:15:33 -04:00
Owner

Task: .claude/tasks/0029-screen-recording.md

Summary

Adds a modules.desktop.recording module, enabled by the desktop aggregator. Super+Shift+R selects a region with slurp and toggles a video-only wf-recorder capture (no -a, so no audio); a second press SIGINTs the recorder so the file finalises. Captures land timestamped in ~/Videos/Recordings, with notify-send toasts on start and on save. A Waybar custom/recording widget samples the wf-recorder process once a second and shows a video glyph while a capture runs, collapsing to nothing when idle. No full-screen variant is offered. neogaia builds green under nix flake check and the config parses under Hyprland --verify-config.

Deviations

  • Bar indicator polls (interval: 1) instead of being signal-driven. An earlier draft signalled Waybar from the toggle, but the start path raised the signal before wf-recorder had launched, so the indicator never lit during a recording (caught in review). Polling is race-free and drops the signal number that was shared across two files.
  • No waybar window-rewrite icon — wf-recorder is headless and slurp is a transient overlay, so neither owns a workspace window and the per-app icon convention doesn't apply.

Review

Risk

Overall: Medium

  • Blast radius: Medium — enabled by default on desktop hosts and edits the shared Waybar modules-right, so a malformed widget degrades the whole bar.
  • Reversibility: Low — pure declarative config; a single revert removes the module, keybind, and indicator with no state migration.
  • Test coverage: Medium — nix flake check proves build/parse and the indicator's idle/recording transitions are verified against a stand-in process, but a live slurp+wf-recorder capture is unexercised.
  • Sensitive domain: Low — captures screen to disk (no audio), no credentials or auth paths.
  • Size & complexity: Low — one small module plus two short edits; linear toggle script.
  • Runtime criticality: Low — a user-invoked keybind and a status glyph, not on a boot/login/system-critical path.

Unaddressed findings

None. The Spec review's confirmed timing bug (indicator never lit during recording) was fixed by switching to interval polling; the two Standards judgement-calls (cross-file signal-coupling comments) were dissolved by removing the signal mechanism and are no longer present.

— Claude


Update: media output paths follow XDG user-dirs

Adds modules.desktop.userdirs (enables home-manager xdg.userDirs, writing ~/.config/user-dirs.dirs), and routes both media tools through xdg-user-dir instead of a hardcoded $HOME path:

  • Recorder → xdg-user-dir VIDEOS<Videos>/Recordings
  • Screenshots (task 0028, aligned here for one atomic convention) → xdg-user-dir PICTURES<Pictures>/Screenshots

Defaults resolve to ~/Videos/Recordings and ~/Pictures/Screenshots as before, but relocating a directory is now a one-line change to xdg.userDirs. Verified: the generated user-dirs.dirs resolves the defaults, and an overridden XDG_VIDEOS_DIR redirects the recorder's base accordingly. This commit also touches modules/desktop/screenshot.nix, which belongs to task 0028.

— Claude

Task: `.claude/tasks/0029-screen-recording.md` ## Summary Adds a `modules.desktop.recording` module, enabled by the desktop aggregator. `Super+Shift+R` selects a region with slurp and toggles a **video-only** wf-recorder capture (no `-a`, so no audio); a second press SIGINTs the recorder so the file finalises. Captures land timestamped in `~/Videos/Recordings`, with `notify-send` toasts on start and on save. A Waybar `custom/recording` widget samples the wf-recorder process once a second and shows a video glyph while a capture runs, collapsing to nothing when idle. No full-screen variant is offered. neogaia builds green under `nix flake check` and the config parses under `Hyprland --verify-config`. ### Deviations - **Bar indicator polls (`interval: 1`) instead of being signal-driven.** An earlier draft signalled Waybar from the toggle, but the start path raised the signal before wf-recorder had launched, so the indicator never lit during a recording (caught in review). Polling is race-free and drops the signal number that was shared across two files. - **No waybar `window-rewrite` icon** — wf-recorder is headless and slurp is a transient overlay, so neither owns a workspace window and the per-app icon convention doesn't apply. ## Review ### Risk **Overall: Medium** - Blast radius: Medium — enabled by default on desktop hosts and edits the shared Waybar `modules-right`, so a malformed widget degrades the whole bar. - Reversibility: Low — pure declarative config; a single revert removes the module, keybind, and indicator with no state migration. - Test coverage: Medium — `nix flake check` proves build/parse and the indicator's idle/recording transitions are verified against a stand-in process, but a live slurp+wf-recorder capture is unexercised. - Sensitive domain: Low — captures screen to disk (no audio), no credentials or auth paths. - Size & complexity: Low — one small module plus two short edits; linear toggle script. - Runtime criticality: Low — a user-invoked keybind and a status glyph, not on a boot/login/system-critical path. ### Unaddressed findings None. The Spec review's confirmed timing bug (indicator never lit during recording) was fixed by switching to interval polling; the two Standards judgement-calls (cross-file signal-coupling comments) were dissolved by removing the signal mechanism and are no longer present. — Claude --- ## Update: media output paths follow XDG user-dirs Adds `modules.desktop.userdirs` (enables home-manager `xdg.userDirs`, writing `~/.config/user-dirs.dirs`), and routes both media tools through `xdg-user-dir` instead of a hardcoded `$HOME` path: - Recorder → `xdg-user-dir VIDEOS` → `<Videos>/Recordings` - Screenshots (task 0028, aligned here for one atomic convention) → `xdg-user-dir PICTURES` → `<Pictures>/Screenshots` Defaults resolve to `~/Videos/Recordings` and `~/Pictures/Screenshots` as before, but relocating a directory is now a one-line change to `xdg.userDirs`. Verified: the generated `user-dirs.dirs` resolves the defaults, and an overridden `XDG_VIDEOS_DIR` redirects the recorder's base accordingly. This commit also touches `modules/desktop/screenshot.nix`, which belongs to task 0028. — Claude
alexion added 1 commit 2026-07-22 22:57:14 -04:00
Add a wf-recorder module, enabled by the desktop aggregator. Super+Shift+R
picks a region with slurp and toggles a video-only capture (no audio), stopped
with SIGINT so the file finalises, saved to ~/Videos/Recordings. Start and
saved notifications fire via notify-send.

A Waybar custom/recording widget samples the wf-recorder process once a second
and shows a video glyph while a capture runs.
alexion added 1 commit 2026-07-22 23:11:18 -04:00
Add a modules.desktop.userdirs module that declares the XDG user directories,
and route the recorder and screenshot tools through xdg-user-dir so their
output folders (Videos/Recordings, Pictures/Screenshots) follow one relocatable
source instead of a hardcoded $HOME path.
alexion merged commit ab89ba8391 into main 2026-07-22 23:15:33 -04:00
alexion deleted branch task-0029-screen-recording 2026-07-22 23:15:33 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dotfiles#21