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