update:extend old scripts + new random ones
This commit is contained in:
@@ -1,3 +1,31 @@
|
||||
#!/bin/bash
|
||||
if pgrep -x wl-screenrec > /dev/null; then pkill -INT wl-screenrec && notify-send "🎥 Recording Stopped" "Saved to ~/videos"; else GEOMETRY=$(slurp); if [ -n "$GEOMETRY" ]; then notify-send "🎥 Recording Started" "Press Super+Alt+v to stop" && wl-screenrec -g "$GEOMETRY" -f ~/videos/recording-$(date +"%Y-%m-%d_%H-%M-%S").mp4 & fi; fi
|
||||
# if pgrep -x wl-screenrec > /dev/null; then pkill -INT wl-screenrec && notify-send "🎥 Recording Stopped" "Saved to ~/videos"; else GEOMETRY=$(slurp); if [ -n "$GEOMETRY" ]; then wl-screenrec -g "$GEOMETRY" -f ~/videos/recording-$(date +"%Y-%m-%d_%H-%M-%S").mp4 & fi; fi
|
||||
|
||||
MODE=${1:-area}
|
||||
OUTPUT=~/videos/recording-$(date +"%Y-%m-%d_%H-%M-%S").mp4
|
||||
|
||||
if pgrep -x wl-screenrec >/dev/null; then
|
||||
pkill -INT wl-screenrec
|
||||
notify-send "🎥 Recording Stopped" "Saved to ~/videos"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$MODE" in
|
||||
area)
|
||||
GEOMETRY=$(slurp)
|
||||
if [ -n "$GEOMETRY" ]; then
|
||||
notify-send "🎥 Recording Started (Area)" "Press Super+Alt+v to stop"
|
||||
wl-screenrec -g "$GEOMETRY" -f "$OUTPUT" &
|
||||
fi
|
||||
;;
|
||||
screen)
|
||||
GEOMETRY=$(slurp -o)
|
||||
if [ -n "$GEOMETRY" ]; then
|
||||
notify-send "🎥 Recording Started (Screen)" "Press Super+Alt+v to stop"
|
||||
wl-screenrec -g "$GEOMETRY" -f "$OUTPUT" &
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [area|screen]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user