From: Siraaj Khandkar Date: Thu, 29 Sep 2022 10:40:03 +0000 (-0400) Subject: Confirm before proceeding with screencast area selection X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=1c381847e6efc90544cbba14411e5e774a2f562e;p=khome.git Confirm before proceeding with screencast area selection --- diff --git a/home/bin/screencast b/home/bin/screencast index 4597820..d9f224d 100755 --- a/home/bin/screencast +++ b/home/bin/screencast @@ -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"