mirror of
https://github.com/quantum5/wayland-recorder.git
synced 2025-04-24 04:01:58 -04:00
11 lines
377 B
Bash
Executable file
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
|