wayland-recorder/record-screen
2021-09-06 21:42:22 -04:00

11 lines
377 B
Bash
Executable file

#!/bin/bash
if ! pkill -INT -P "$(pgrep -xo record-screen)" wf-recorder 2>/dev/null; then
geometry="$(slurp -d)"
if [ -n "$geometry" ]; then
pkill -USR1 -x record-screend
mkdir -p ~/Videos/Recordings
wf-recorder -f ~/Videos/Recordings/"screen-record-$(date +%Y-%m-%d-%H-%M-%S).mp4" -g "$geometry"
pkill -USR2 -x record-screend
fi
fi