Krolyxon
Commit 20491f2

Branches

Refs →

dotfiles-x1120491f2

dmenurecord script

Author
krolyxon
Date
2022-08-15 13:18 +0530
Parent
d213a09
Commit
20491f2f6a1f97678c5149e7abbe10501e7db7f4

+31 −1

2 files changed

  1. M .config/newsboat/urls +2 −1
  2. A .local/bin/dmenurecord +29 −0
M .config/newsboat/urls View
@@ -2,8 +2,9 @@ https://blog.rust-lang.org/feed.xml "programming"
22 https://matklad.github.io/feed.xml "programming"
33 https://ihatereality.space/rss.xml "programming"
44 https://fasterthanli.me/index.xml "programming"
5−https://digdeeper.neocities.org/atom.xml
5+https://digdeeper.club/atom.xml
66 https://gnulinuxindia.org/index.xml
7+https://krolyxon.vern.cc/atom.xml
78 https://lukesmith.xyz/rss.xml
89 https://landchad.net/rss
910 https://news.ycombinator.com/rss
A .local/bin/dmenurecord View
@@ -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