summaryrefslogtreecommitdiffstats
path: root/.scripts/dmenurecord
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-04-10 23:08:43 -0700
committerLuke Smith <luke@lukesmith.xyz>2018-04-10 23:08:43 -0700
commitf61ab667856a6896a0395a84c85cc4c1f139c630 (patch)
tree2d9c9c6353d837e53695cb3d664d4926a25ad33c /.scripts/dmenurecord
parente2225d418d38e53f63bb1c279cc8b9af45ea6e3a (diff)
downloadeibhear-f61ab667856a6896a0395a84c85cc4c1f139c630.tar.gz
eibhear-f61ab667856a6896a0395a84c85cc4c1f139c630.tar.zst
eibhear-f61ab667856a6896a0395a84c85cc4c1f139c630.zip
Overhaul of screencasting scripts
Diffstat (limited to '.scripts/dmenurecord')
-rwxr-xr-x.scripts/dmenurecord24
1 files changed, 24 insertions, 0 deletions
diff --git a/.scripts/dmenurecord b/.scripts/dmenurecord
new file mode 100755
index 0000000..75cc6ff
--- /dev/null
+++ b/.scripts/dmenurecord
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# A dmenu recording prompt for my different recording scripts.
+
+# Asks for type of recording and uses one of my three different scripts.
+asktype() { \
+case $(echo -e "Screencast\nVideo only\nAudio only" | dmenu -i -p "Select recording style:") in
+ Screencast) screencast ;;
+ "Audio only") audio ;;
+ "Video only") video ;;
+esac ;}
+
+# If already running, will ask to end previous recording.
+
+asktoend() { \
+response=$(echo -e "No\nYes" | dmenu -i -p "Recording still active. End recording?") &&
+if [[ "$response" = "Yes" ]]; then killall ffmpeg; fi ;}
+
+if (( $(pgrep dmenurecord | wc -l) > 2 )); then
+asktoend;
+else
+asktype;
+fi
+echo $response