Skip to content

Screen recording: add optional max duration#5783

Closed
davidguttman wants to merge 1 commit into
basecamp:devfrom
davidguttman:screenrecord-max-duration
Closed

Screen recording: add optional max duration#5783
davidguttman wants to merge 1 commit into
basecamp:devfrom
davidguttman:screenrecord-max-duration

Conversation

@davidguttman
Copy link
Copy Markdown
Contributor

Closes #5782.

Adds a Max duration submenu to the screenrecord flow (Unlimited / 15min / 30min / 1h / 2h). "Unlimited" is first and preserves today's behavior. When a finite duration is picked, an auto-stop is scheduled against the specific gpu-screen-recorder PID, so a manual stop (Alt+Print or the waybar indicator) followed by a new recording can't be killed by an orphaned timer — the timer re-checks /proc/$pid before signaling.

The duration prompt happens before omarchy-capture-screenrecording is invoked, so the prompt itself isn't captured. The two helpers (wait_for_screenrecorder_pid, schedule_screenrecord_autostop) keep the call site to a single line and document the safety property.

Test plan

  • Unlimited → records until manual stop (unchanged behavior).
  • 15min → records and auto-stops at 15min.
  • Start 30min, manually stop at ~10s (Alt+Print or waybar click), immediately start a new Unlimited → new recording is not killed at t=30min.
  • All four audio/webcam combos still selectable.

Copilot AI review requested due to automatic review settings May 12, 2026 16:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dhh
Copy link
Copy Markdown
Member

dhh commented May 15, 2026

Interesting idea, but can't say it's a problem I've ever had. We have the indicator in the menu to remind you that we're recording. But could be a neat script to add on your own setup, then bind a custom hotkey for it. That's the fun part of owning your own operating system!

@dhh dhh closed this May 15, 2026
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.

Screen recording: add optional max duration

3 participants