From da7222f51002ebd946a13ab54dd2d43a22586056 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 24 Aug 2025 16:57:41 +0200 Subject: [PATCH] Move it inside where it is used --- bin/omarchy-cmd-screenrecord | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index c0111cc6..a0c781b1 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -1,10 +1,5 @@ #!/bin/bash -if ! lspci | grep -Eqi 'nvidia|intel.*graphics' && ! command -v wl-screenrec >/dev/null; then - notify-send "Installing wl-screenrec in order to make screen recordings..." - yay -S --noconfirm wl-screenrec -fi - [[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}" @@ -21,6 +16,11 @@ screenrecording() { if lspci | grep -Eqi 'nvidia|intel.*graphics'; then wf-recorder -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" else + if ! command -v wl-screenrec >/dev/null; then + notify-send "Installing wl-screenrec in order to make screen recordings..." + yay -S --noconfirm wl-screenrec + fi + wl-screenrec -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" fi }