From ba20d0e6719069ddf1d54179817787471bb971b3 Mon Sep 17 00:00:00 2001 From: ls Date: Wed, 7 Aug 2024 14:45:50 +0200 Subject: [PATCH] U_totptui.sh added termux clipboard support --- totptui/totptui.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/totptui/totptui.sh b/totptui/totptui.sh index 48dc748..4f1d517 100755 --- a/totptui/totptui.sh +++ b/totptui/totptui.sh @@ -84,7 +84,8 @@ TOTP_CODE=$(oathtool $OATHTOOL_ARGS "$key") #clear; echo -e "\e[31m$(figlet $TOTP_CODE)\e[0m" figlet_output=$(figlet -f slant "$TOTP_CODE") -echo $TOTP_CODE | xclip & +if [ -f /usr/bin/xclip ]; then echo $TOTP_CODE | xclip; fi +if [ -f /data/data/com.termux/files/usr/bin/termux-clipboard-set ]; then echo $TOTP_CODE | termux-clipboard-set; fi whiptail --title "TOTP-TUI" --msgbox "TOTP \"$account_name\" :\n\n$figlet_output" 14 45 exit #done