now the screenrec notif also acts as a button to stop recordin
parent
fbce22632d
commit
8e788f624d
|
|
@ -1,19 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
endrec () {
|
||||
killall -s SIGINT wf-recorder
|
||||
dunstctl close $nid
|
||||
notify-send "recording ended - output to $outfile"
|
||||
}
|
||||
|
||||
mkdir -p ~/Videos
|
||||
statecon=$( pidof wf-recorder )
|
||||
|
||||
|
||||
outfile="$HOME/Videos/$(date +'%Y%m%d%H%M%S').mp4"
|
||||
$outfile
|
||||
#$outfile
|
||||
nid=""
|
||||
if [ "$statecon" == '' ]; then
|
||||
$nid=$(notify-send -p -u critical -t 0 "recording started")
|
||||
wf-recorder -g "$(slurp)" -f $outfile
|
||||
wf-recorder -g "$(slurp)" -f $outfile &
|
||||
$nid=$(notify-send -p -u critical -t 0 "recording started" --action="goto endrecplace"
|
||||
)
|
||||
else
|
||||
dunstctl close $nid
|
||||
notify-send "recording ended - output to $outfile"
|
||||
killall -s SIGINT wf-recorder
|
||||
endrec
|
||||
fi
|
||||
goto endplace
|
||||
|
||||
:endrecplace
|
||||
endrec
|
||||
|
||||
:endplace
|
||||
|
|
|
|||
Loading…
Reference in New Issue