Skip to content

Add OmaRecord with optional keystroke overlay - #305

Closed
inde3d100 wants to merge 3 commits into
omacom:quattrofrom
inde3d100:feature/keystroke-overlay
Closed

inde3d100 wants to merge 3 commits into
omacom:quattrofrom
inde3d100:feature/keystroke-overlay

Conversation

@inde3d100

@inde3d100 inde3d100 commented Aug 31, 2026 •

Copy link
Copy Markdown

Summary

  • brand screen recording as OmaRecord, with a standalone omarecord command and matching menu and hotkey labels
  • add --show-keystrokes using Show Me The Key
  • keep overlay ownership scoped by PID/start time and clean it on stop, startup failure, signals, or unexpected recorder exit
  • reject portal capture where a separate overlay cannot be guaranteed in the recording
  • add Hyprland placement rules, focused shell coverage, and manual instructions

Verification

  • bash test/shell.d/screenrecording-test.sh
  • bash test/shell.d/menu-test.sh
  • bin/omarchy commands --check (454 commands)
  • syntax-checked all 457 bin/omarchy-* commands
  • ./test/all completed with six failures outside the changed files: bin-style-test.sh, config-test.sh, launch-about-test.sh, monitor-recovery-test.sh, theme-install-guards-test.sh, and unowned-system-paths-test.sh

@inde3d100 inde3d100 changed the title Add optional keystroke overlay to screen recordings Add OmaRecord with optional keystroke overlay Aug 31, 2026

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --show-keystrokes work here is good. Ownership by PID plus start time, the handoff to a detached watchdog, and cleanup on every exit path are all exercised by real tests that spawn stub processes and check what got killed. screenrecording-test.sh and menu-test.sh pass on this branch, and showmethekey is in extra for aarch64, so the install hint is right.

I would like the PR split, though.

bug: bin/omarecord and the OmaRecord rebrand. AGENTS.md says every command starts with omarchy-, and this is the first file in bin/ that does not. The rename also rewrites lines that upstream owns — origin/quattro still has "Screenrecording" in utilities.lua and "Stop Screenrecording" in omarchy-menu.jsonc — so media.lua, utilities.lua, the menu, and two manual pages would conflict on every merge for a naming change. Please drop the rebrand and the wrapper and keep the keystroke overlay as its own PR; I will merge that gladly.

bug: the when guard on the stop entry still only matches gpu-screen-recorder, so it never appears on Apple Silicon where wf-recorder runs. Inline.

nit: handoff_keystroke_overlay clears every trap with trap - EXIT HUP INT TERM; fine today because the script sets no others, but brittle.

nit: the test builds keystroke_state from $XDG_RUNTIME_DIR while the script uses ${XDG_RUNTIME_DIR:-/tmp}, so they diverge when it is unset.

Comment thread bin/omarecord
@@ -0,0 +1,2 @@
#!/bin/bash
exec "$OMARCHY_PATH/bin/omarchy-capture-screenrecording" "$@"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug: AGENTS.md — "All commands start with omarchy-". This is the only file in bin/ that does not, and the menu and manual now depend on it. Please drop it; omarchy screenrecord and omarchy capture screenrecording already route here.

"trigger.capture.screenshot": {"icon":"","label":"Screenshot","action":"omarchy-capture-screenshot"},
"trigger.capture.screenrecord.stop": {"icon":"","label":"Stop Screenrecording","when":"pgrep -f '^gpu-screen-recorder'","action":"omarchy-capture-screenrecording --stop-recording"},
"trigger.capture.screenrecord": {"icon":"","label":"Screenrecord"},
"trigger.capture.screenrecord.stop": {"icon":"","label":"Stop OmaRecord","when":"pgrep -f '^gpu-screen-recorder'","action":"omarecord --stop-recording"},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug: pgrep -f '^gpu-screen-recorder' never matches on Apple Silicon, where this script picks wf-recorder, so "Stop" is missing from the menu there. RECORDER_PROCESS_RE in the script already has the right pattern: ^(gpu-screen-recorder|wf-recorder).

setsid -f "$0" --keystroke-overlay-watchdog="$overlay_pid:$overlay_started_at:$recorder_pid:$recorder_started_at" </dev/null &>/dev/null || return 1

KEYSTROKE_OVERLAY_STARTUP_OWNED="false"
trap - EXIT HUP INT TERM

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this resets every trap, not just the ones start_keystroke_overlay installed. Safe because the base script sets none, but the next person to add an EXIT trap will lose it here.

@malik-na

malik-na commented Sep 9, 2026

Copy link
Copy Markdown
Member

Please keep the keystroke overlay but drop the OmaRecord rename and wrapper. Also take #374's recorder matcher so Stop appears for wf-recorder on Apple Silicon; the current guard still only sees gpu-screen-recorder.

@malik-na

Copy link
Copy Markdown
Member

Needs work. Regular recording produced a finalized, decodeable MP4, but the keystroke overlay cannot be installed through the documented omarchy pkg add showmethekey path. The Stop menu only detects gpu-screen-recorder, so it disappears when wf-recorder is active. Rename/remove the unprefixed omarecord command, use the current recorder guard/action path, provide a working overlay install path, and resolve the conflicts while retaining quattro’s recorder safety and audio fixes.

@wesleygrimes wesleygrimes added the defer Parked. Needs a decision, or may die with the fork. Do not close or port yet. label Sep 12, 2026
@malik-na malik-na added lvl 0 Core userspace: display, audio, video, graphics, memory, storage, battery, keyboard, network, BT. US labels Sep 18, 2026
@inde3d100 inde3d100 closed this by deleting the head repository Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

defer Parked. Needs a decision, or may die with the fork. Do not close or port yet. lvl 0 Core userspace: display, audio, video, graphics, memory, storage, battery, keyboard, network, BT. US

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants