From 83e7f41308f4a7e7c9a6ff54c594b707c2ca54a6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 16 May 2026 16:47:22 +0200 Subject: [PATCH] Add --fullscreen to make it easier for agents to record --- bin/omarchy-capture-screenrecording | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-capture-screenrecording b/bin/omarchy-capture-screenrecording index 6e2bf1a2..75beedc3 100755 --- a/bin/omarchy-capture-screenrecording +++ b/bin/omarchy-capture-screenrecording @@ -2,7 +2,7 @@ # omarchy:summary=Start or stop screen recording # omarchy:group=capture -# omarchy:args=[--with-desktop-audio] [--with-microphone-audio] [--with-webcam] [--webcam-device=] [--resolution=] [--stop-recording] +# omarchy:args=[--fullscreen] [--with-desktop-audio] [--with-microphone-audio] [--with-webcam] [--webcam-device=] [--resolution=] [--stop-recording] # omarchy:examples=omarchy screenrecord | omarchy capture screenrecord --with-desktop-audio # omarchy:aliases=omarchy screenrecord # @@ -31,6 +31,7 @@ MICROPHONE_AUDIO="false" WEBCAM="false" WEBCAM_DEVICE="" RESOLUTION="" +FULLSCREEN="false" STOP_RECORDING="false" RECORDING_FILE="/tmp/omarchy-screenrecord-filename" LOG_FILE=$([[ ${OMARCHY_SCREENRECORD_DEBUG:-false} == "true" ]] && echo "/tmp/omarchy-screenrecord.log" || echo "/dev/null") @@ -42,6 +43,7 @@ for arg in "$@"; do --with-webcam) WEBCAM="true" ;; --webcam-device=*) WEBCAM_DEVICE="${arg#*=}" ;; --resolution=*) RESOLUTION="${arg#*=}" ;; + --fullscreen) FULLSCREEN="true" ;; --stop-recording) STOP_RECORDING="true" ;; esac done @@ -167,7 +169,10 @@ start_screenrecording() { # the portal backend supports and the kms backend doesn't). Default flow uses # slurp + the kms backend, which avoids the EGL DMA-BUF modifier import # failures the portal path can hit on some configurations. - if [[ ${OMARCHY_SCREENRECORD_USE_PORTAL:-false} == "true" ]]; then + if [[ $FULLSCREEN == "true" ]]; then + target="monitor:$(omarchy-hyprland-monitor-focused)" + capture_args=(-w "${target#monitor:}" -s "${RESOLUTION:-$(default_resolution)}") + elif [[ ${OMARCHY_SCREENRECORD_USE_PORTAL:-false} == "true" ]]; then target="portal" capture_args=(-w portal -s "${RESOLUTION:-$(default_resolution)}") else