dotfiles-x1120491f2
dmenurecord script
+31 −1
2 files changed
- M .config/newsboat/urls +2 −1
- A .local/bin/dmenurecord +29 −0
| @@ -2,8 +2,9 @@ https://blog.rust-lang.org/feed.xml "programming" | |||
| 2 | 2 | https://matklad.github.io/feed.xml "programming" | |
| 3 | 3 | https://ihatereality.space/rss.xml "programming" | |
| 4 | 4 | https://fasterthanli.me/index.xml "programming" | |
| 5 | − | https://digdeeper.neocities.org/atom.xml | |
| 5 | + | https://digdeeper.club/atom.xml | |
| 6 | 6 | https://gnulinuxindia.org/index.xml | |
| 7 | + | https://krolyxon.vern.cc/atom.xml | |
| 7 | 8 | https://lukesmith.xyz/rss.xml | |
| 8 | 9 | https://landchad.net/rss | |
| 9 | 10 | https://news.ycombinator.com/rss | |
| @@ -0,0 +1,29 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | ||
| 3 | + | screencast() { \ | |
| 4 | + | ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 \ | |
| 5 | + | -f pulse -ac 2 -ar 48000 -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \ | |
| 6 | + | ~/vids/recs/"$(date '+%C%y-%m%M-%d-%H-%M-%S').mp4" & | |
| 7 | + | echo $! > /tmp/recordingpid | |
| 8 | + | } | |
| 9 | + | ||
| 10 | + | ||
| 11 | + | killrecording() { | |
| 12 | + | recpid="$(cat /tmp/recordingpid)" | |
| 13 | + | kill -15 "$recpid" | |
| 14 | + | rm -f /tmp/recordingpid | |
| 15 | + | sleep 3 | |
| 16 | + | kill -9 "$recpid" | |
| 17 | + | exit | |
| 18 | + | } | |
| 19 | + | ||
| 20 | + | asktoend() { \ | |
| 21 | + | response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && | |
| 22 | + | [ "$response" = "Yes" ] && killrecording | |
| 23 | + | } | |
| 24 | + | ||
| 25 | + | if [ -f /tmp/recordingpid ]; then | |
| 26 | + | asktoend && exit | |
| 27 | + | else | |
| 28 | + | screencast | |
| 29 | + | fi | |