Skip to content

Instantly share code, notes, and snippets.

@hkupty
Created December 18, 2019 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkupty/54a445081ff76abab48a7136af125f86 to your computer and use it in GitHub Desktop.
Save hkupty/54a445081ff76abab48a7136af125f86 to your computer and use it in GitHub Desktop.
Select yubikey oath on rofi - so I don't have to go to the terminal
#!/bin/bash
set -euo pipefail
ykman info > /dev/null
SELECTED=$(ykman oath list | rofi -dmenu)
if [ -n "${SELECTED}" ]; then
ykman oath code ${SELECTED} | awk '{ print $NF }' | xsel -b
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment