Dotfiles/desktopenvs/hyprland/scripts/screenrec.sh

18 lines
334 B
Bash
Executable File

#!/bin/bash
mkdir -p ~/Videos
statecon=$( pidof wf-recorder )
if [ "$statecon" == '' ]; then
rm ~/Videos/lastrec.mp4
notify-send "recording started"
wf-recorder -g "$(slurp)" -a -f ~/Videos/lastrec.mp4
else
notify-send "recording ended"
killall -s SIGINT wf-recorder
wl-copy < ~/Videos/lastrec.mp4
fi