diff --git a/desktopenvs/hyprland/scripts/screenrec.sh b/desktopenvs/hyprland/scripts/screenrec.sh index 78d7263..90c99a3 100755 --- a/desktopenvs/hyprland/scripts/screenrec.sh +++ b/desktopenvs/hyprland/scripts/screenrec.sh @@ -2,16 +2,17 @@ mkdir -p ~/Videos statecon=$( pidof wf-recorder ) -if [ "$statecon" == '' ]; then - rm ~/Videos/lastrec.mp4 + +outfile="$HOME/Videos/$(date +'%Y%m%d%H%M%S').mp4" +$outfile + +if [ "$statecon" == '' ]; then notify-send "recording started" - wf-recorder -g "$(slurp)" -a -f ~/Videos/lastrec.mp4 + wf-recorder -g "$(slurp)" -f $outfile else - - notify-send "recording ended" + notify-send "recording ended - output to $outfile" killall -s SIGINT wf-recorder - wl-copy < ~/Videos/lastrec.mp4 fi