dmenurecord script
This commit is contained in:
parent
d213a09b2b
commit
20491f2f6a
|
|
@ -2,8 +2,9 @@ https://blog.rust-lang.org/feed.xml "programming"
|
|||
https://matklad.github.io/feed.xml "programming"
|
||||
https://ihatereality.space/rss.xml "programming"
|
||||
https://fasterthanli.me/index.xml "programming"
|
||||
https://digdeeper.neocities.org/atom.xml
|
||||
https://digdeeper.club/atom.xml
|
||||
https://gnulinuxindia.org/index.xml
|
||||
https://krolyxon.vern.cc/atom.xml
|
||||
https://lukesmith.xyz/rss.xml
|
||||
https://landchad.net/rss
|
||||
https://news.ycombinator.com/rss
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
screencast() { \
|
||||
ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 \
|
||||
-f pulse -ac 2 -ar 48000 -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
|
||||
~/vids/recs/"$(date '+%C%y-%m%M-%d-%H-%M-%S').mp4" &
|
||||
echo $! > /tmp/recordingpid
|
||||
}
|
||||
|
||||
|
||||
killrecording() {
|
||||
recpid="$(cat /tmp/recordingpid)"
|
||||
kill -15 "$recpid"
|
||||
rm -f /tmp/recordingpid
|
||||
sleep 3
|
||||
kill -9 "$recpid"
|
||||
exit
|
||||
}
|
||||
|
||||
asktoend() { \
|
||||
response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") &&
|
||||
[ "$response" = "Yes" ] && killrecording
|
||||
}
|
||||
|
||||
if [ -f /tmp/recordingpid ]; then
|
||||
asktoend && exit
|
||||
else
|
||||
screencast
|
||||
fi
|
||||
Loading…
Reference in New Issue