tessen

default description
git clone https://git.awy.one/tessen.git
Log | Files | Refs | README | LICENSE

commit ca9629fcb8ea21cfc12e000f9d1c714ce275c80b
parent 25de9c8cc87e26d5d7688e6d2faf1b4bb1c936e3
Author: Ayush Agarwal <ayushnix@fastmail.com>
Date:   Tue, 21 Mar 2023 11:44:49 +0530

feat: map exit codes to OTP autotype and copy

Diffstat:
Mtessen | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tessen b/tessen @@ -166,6 +166,8 @@ custom_keyb_action() { 14) wld_copy "$_TSN_USERNAME" ;; 15) wld_copy "$_TSN_PASSWORD" ;; 16) wld_copy "$_TSN_URL" ;; + 17) key_otp autotype ;; + 18) key_otp copy ;; *) _die "unmapped exit code detected" ;; esac } @@ -320,7 +322,14 @@ key_otp() { if ! [[ $tmp_otp =~ ^[[:digit:]]+$ ]]; then _die "invalid OTP detected" fi - key_action "$tmp_otp" + + if [[ "$1" == "autotype" ]]; then + auto_type "$tmp_otp" + elif [[ "$1" == "copy" ]]; then + wld_copy "$tmp_otp" + else + key_action "$tmp_otp" + fi unset -v tmp_otp }