diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/menu | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -100,8 +100,8 @@ case "$ACTION" in CHOICE="$(pass_list | show 'username')" if [ -n "$CHOICE" ]; then if pass show -c2 "$CHOICE"; then - notify-send -t 5000 -u normal -- "$CHOICE" \ - 'username copied to clipboard' + notify-send -t 5000 -u normal -- \ + "$CHOICE" 'username copied to clipboard' fi fi ;; @@ -111,8 +111,8 @@ case "$ACTION" in echo trap 'clipctl enable' EXIT # FIXME echo clipctl disable if pass show -c1 "$CHOICE"; then - notify-send -t 5000 -u critical -- "$CHOICE" \ - 'password copied to clipboard' + notify-send -t 5000 -u critical -- \ + "$CHOICE" 'password copied to clipboard' fi fi ;; @@ -123,8 +123,14 @@ case "$ACTION" in clipmgr -l | show 'clipboard' | copy ;; yubikey) - echo 'yubikey-oath-dmenu' # FIXME - exit 2 + CHOICE="$(ykman oath accounts list | show 'OTP')" + if [ -n "$CHOICE" ]; then + ykman oath accounts code "$CHOICE" | + awk '{ print $(NF) }' | + copy -n + notify-send -t 5000 -u critical -- \ + "$CHOICE" 'code copied to clipboard' + fi ;; *) printf 'Bad ACTION: %s.\n\n' "$ACTION" >&2 |