summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mpass-otp
blob: 52d134108befac2254ce911a3d37504a701b502a (plain)
1
2
3
4
5
6
7
#!/bin/sh
pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -iname "*.gpg" |
    sed "/^\./d;s#^$PASSWORD_STORE_DIR/keys/otp/##;s/\.gpg$//" |
    commander -c)"
[ "$pass" ] || exit 1
pass otp -c keys/otp/"$pass"
notify-send -t 1000 "mpass" "copied $pass"