blob: bfa344fbf815c3a451073f2d1804fef96851e710 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
pb=$PASSWORD_STORE_DIR
[ -z "$PASSWORD_STORE_CLIP_TIME" ] && ct=45 || ct=$PASSWORD_STORE_CLIP_TIME
chars=$(echo $pb | wc -c)
accts=$(find $pb -type f -name "*.gpg" | cut -c 2- | \
grep -v ".*-OTP.gpg\|.*-2farecovery.gpg" | cut -c $chars- | \
rev | cut -c 5- | rev)
acct="$(echo "$accts" | dmenu)"
[ "$acct" = "" ] && exit
pass show $acct | xclip -r -selection "primary" \
&& pass show $acct | xclip -r -selection "clipboard" \
&& notify-send "Password Copied to Clipboard" \
&& sleep $ct \
&& pkill xclip
|