Files
omarchy/bin/omarchy-screenrecord
2025-07-19 16:49:50 -05:00

15 lines
434 B
Bash
Executable File

#!/bin/bash
if pgrep -x wl-screenrec >/dev/null; then
pkill -x wl-screenrec
notify-send "Screen recording saved to ~/Videos" -t 2000
else
region=$(slurp) || exit 1
notify-send "Screen recording starting..." -t 1000
sleep 1
wl-screenrec \
-g "$region" \
-f "$HOME/Videos/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4" \
--ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart"
fi