Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/omarchy-cmd-screenrecord
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SCOPE="$1"
AUDIO=$([[ $2 == "audio" ]] && echo "--audio")

start_screenrecording() {
filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"

if lspci | grep -qi 'nvidia'; then
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" &
Expand Down Expand Up @@ -47,7 +47,8 @@ screenrecording_active() {
if screenrecording_active; then
stop_screenrecording
elif [[ "$SCOPE" == "output" ]]; then
start_screenrecording
output=$(slurp -o) || exit 1
start_screenrecording -g "$output"
else
region=$(slurp) || exit 1
start_screenrecording -g "$region"
Expand Down