Skip to content

Instantly share code, notes, and snippets.

@mnakama
Created May 26, 2021 21:48
Show Gist options
  • Save mnakama/8dcae40aaa549ea8f91efca9eec65092 to your computer and use it in GitHub Desktop.
Save mnakama/8dcae40aaa549ea8f91efca9eec65092 to your computer and use it in GitHub Desktop.
password dmenu script for TOTP codes.
#export PASSWORD_STORE_DIR="$HOME/SpiderOak Hive/.password-store"
export PASSWORD_STORE_DIR="$HOME/.password-store"
cd $PASSWORD_STORE_DIR
PASS=`find * -name '*otp.gpg' | sed s/\.gpg// | dmenu -l 10`
[[ -n $PASS ]] || exit
#pass -c $PASS
pass otp $PASS | { read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --delay 0 --file -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment