summaryrefslogtreecommitdiff
path: root/bin/menuscripts/mpotp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/menuscripts/mpotp')
-rwxr-xr-xbin/menuscripts/mpotp7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/menuscripts/mpotp b/bin/menuscripts/mpotp
new file mode 100755
index 0000000..2be6186
--- /dev/null
+++ b/bin/menuscripts/mpotp
@@ -0,0 +1,7 @@
+#!/bin/sh
+pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -iname "*.gpg" |
+ sed "/^\./d;s#^$PASSWORD_STORE_DIR/keys/otp/##;s/\.gpg$//" |
+ dmenu -c)"
+[ "$pass" ] || exit 1
+pass otp -c keys/otp/"$pass"
+notify-send -t 1000 "mpass" "copied $pass"