Skip to content

feat: screen recorder backend chooser, fix setup keyboard grab - #92

Open
Walker-00 wants to merge 2 commits into
Brainitech:devfrom
Walker-00:dev
Open

Walker-00 wants to merge 2 commits into
Brainitech:devfrom
Walker-00:dev

Conversation

@Walker-00

Copy link
Copy Markdown

Overview

Backend chooser for screen recording. Fix notification false-positive on failed backend. Restore typing during Alt+F9 setup.

Changes

  • Add backend selector (wf-recorder / gpu-screen-recorder / wl-screenrec) to options panel, persisted
  • Stop/discard signal actual selected backend instead of hardcoded wf-recorder
  • "Recording Saved" checks file exists; shows "Recording Failed" + backend name if not
  • Remove exclusive keyboard grab from setup strip; Escape via non-consuming global shortcut → typing works during setup

Type of Change

  • New feature
  • Bug fix

Testing

  • Tested locally
  • Backend switching works
  • Typing during Alt+F9 confirmed
  • Escape cancels setup
  • Failed backend shows error notification

- Add backend chooser (wf-recorder / gpu-screen-recorder / wl-screenrec)
  to ScreenRecService and the options panel, persisted via PrefsService.
- Stop/discard now signal whichever backend binary is actually selected,
  instead of always pkill wf-recorder.
- "Recording Saved" notification now checks the file actually landed
  before claiming success; shows "Recording Failed" naming the backend
  otherwise (a dead/unsupported backend was silently reported as saved).
- Fix Alt+F9 record setup grabbing exclusive keyboard focus for the
  whole desktop just to catch Escape, which blocked typing anywhere
  until Record or Escape was pressed. Escape-to-cancel now runs through
  a non-consuming "quickshell:screenrecCancel" global shortcut instead,
  so it still works without taking the keyboard from other windows.
Restores the deliberate Esc-to-exit behaviour and fixes the backend
blockers found in review.

- Revert the keyboard-focus change: record setup is meant to be modal,
  like a region selection, so it cannot be started and forgotten. The
  global ESCAPE bind is dropped with it, since a bare non-consuming
  Escape also cancelled setup from inside other apps (Vim insert mode,
  dialogs) and hijacked a very common key.
- Stop/discard the backend by pid instead of by name. Linux caps
  /proc/pid/comm at 15 chars, so "gpu-screen-recorder" (19) never
  matched pkill and the recording could not be stopped at all. The
  backend is now exec'd so it replaces the bash wrapper, making it the
  tracked process, and receives SIGINT directly. Avoids pkill -f, which
  would also match unrelated command lines.
- gpu-screen-recorder audio: pass the node as -a device:<name>; a bare
  node name is rejected or silently records silence.
- Persist the backend choice: onScreenrecBackendChanged was missing, so
  the selection never reached shell_prefs.json.
- Fullscreen capture now names the focused Hyprland output. wl-screenrec
  requires --output once more than one display is connected, and
  gpu-screen-recorder's "screen" target grabs the first enumerated
  monitor rather than the focused one.
- Backend tiles keep their labels clear of the status dot and elide
  instead of overlapping it.
- Detect which backend binaries are installed: missing ones are dimmed
  in the options panel, and starting one reports it instead of failing
  silently.
- List gpu-screen-recorder and wl-screenrec as optional dependencies in
  install-arch.sh, install-nix.sh, validate-install.sh and the README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant