From df13763d42bc9ea19b34c3b5583652e6b869393c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 19 Jul 2025 22:43:28 -0500 Subject: [PATCH] Better extraction --- bin/omarchy-screenrecord | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/omarchy-screenrecord b/bin/omarchy-screenrecord index eeb4278..3f828c0 100755 --- a/bin/omarchy-screenrecord +++ b/bin/omarchy-screenrecord @@ -1,21 +1,20 @@ #!/bin/bash screenrecording() { + notify-send "Screen recording starting..." -t 1000 + sleep 1 wl-screenrec \ -f "$HOME/Videos/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" \ - --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" + --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" \ + "$@" } if pgrep -x wl-screenrec >/dev/null; then pkill -x wl-screenrec notify-send "Screen recording saved to ~/Videos" -t 2000 -elif [[ $1 == "output" ]]; then - notify-send "Screen recording starting..." -t 1000 - sleep 1 +elif [[ "$1" == "output" ]]; then screenrecording -o "" else region=$(slurp) || exit 1 - notify-send "Screen recording starting..." -t 1000 - sleep 1 screenrecording -g "$region" fi