19 lines
334 B
Bash
Executable File
19 lines
334 B
Bash
Executable File
#!/bin/bash
|
|
|
|
mkdir -p ~/Videos
|
|
statecon=$( pidof wf-recorder )
|
|
|
|
|
|
outfile="$HOME/Videos/$(date +'%Y%m%d%H%M%S').mp4"
|
|
$outfile
|
|
|
|
if [ "$statecon" == '' ]; then
|
|
notify-send "recording started"
|
|
wf-recorder -g "$(slurp)" -f $outfile
|
|
else
|
|
notify-send "recording ended - output to $outfile"
|
|
killall -s SIGINT wf-recorder
|
|
fi
|
|
|
|
|