passmenu - localbin - leot's localbin (~/bin)
(HTM) hg clone https://bitbucket.org/iamleot/localbin
(DIR) Log
(DIR) Files
(DIR) Refs
---
passmenu
---
1 #!/bin/sh
2
3 #
4 # Reimplementation of passmenu script in portable sh(1).
5 # `--type' option is always assumed (i.e. xdotool is always used to type
6 # the password)
7 #
8
9 password_store_dir=${PASSWORD_STORE_DIR:-~/.password-store}
10
11 password_name=$(find ${password_store_dir} -name '*.gpg' |
12 sed -e "s;^${password_store_dir};;" -e 's;^/;;' -e 's;\.gpg$;;' |
13 sort |
14 dmenu)
15
16 if [ -z "${password_name}" ]; then
17 exit 1
18 fi
19
20 { printf "type --clearmodifiers -- " ;
21 pass show "${password_name}" | head -n 1 ; } |
22 xdotool -