Confirm before proceeding with screencast area selection
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 29 Sep 2022 10:40:03 +0000 (06:40 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 29 Sep 2022 10:40:03 +0000 (06:40 -0400)
home/bin/screencast

index 4597820..d9f224d 100755 (executable)
@@ -8,6 +8,16 @@ EXT=mkv
 #EXT=ogv # Low quality for some reason
 
 main() {
+    local response
+    printf 'Proceed? (Y/n)\n'
+    read -rsn 1 response
+    case "$response" in
+        '' | y | Y )
+            true;;
+        *)
+            exit 1;;
+    esac
+
     local -r timestamp=$(date +'%Y-%m-%d--%H-%M-%S') || exit 1
     local -r file_name="screen--${timestamp}.$EXT"
     local -r file_path="$DIR"/"$file_name"
This page took 0.027225 seconds and 4 git commands to generate.