U_totptui.sh added termux clipboard support

This commit is contained in:
T0MuX 2024-08-07 14:45:50 +02:00
parent 181385efa0
commit ba20d0e671

View file

@ -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