From 7d95dcdfc7fd603998461dbc99d54f3c6fd51ae3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 28 Feb 2026 17:51:59 +0100 Subject: [PATCH] In order of apperance --- bin/omarchy-cmd-screenrecord | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index 072cfab1..56813dd5 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -32,24 +32,6 @@ for arg in "$@"; do esac done -default_resolution() { - local width height - read -r width height < <(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.width) \(.height)"') - if ((width > 3840 || height > 2160)); then - echo "3840x2160" - else - echo "0x0" - fi -} - -toggle_screenrecording_indicator() { - pkill -RTMIN+8 waybar -} - -cleanup_webcam() { - pkill -f "WebcamOverlay" 2>/dev/null -} - start_webcam_overlay() { cleanup_webcam @@ -90,6 +72,20 @@ start_webcam_overlay() { sleep 1 } +cleanup_webcam() { + pkill -f "WebcamOverlay" 2>/dev/null +} + +default_resolution() { + local width height + read -r width height < <(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.width) \(.height)"') + if ((width > 3840 || height > 2160)); then + echo "3840x2160" + else + echo "0x0" + fi +} + start_screenrecording() { local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" local audio_devices="" @@ -145,6 +141,10 @@ stop_screenrecording() { rm -f "$RECORDING_FILE" } +toggle_screenrecording_indicator() { + pkill -RTMIN+8 waybar +} + screenrecording_active() { pgrep -f "^gpu-screen-recorder" >/dev/null }