diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-23 22:22:38 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-23 22:22:38 +0200 |
commit | 95d100938736d074a404a5f4d4ef1a38ceaab515 (patch) | |
tree | ee61b7ca8120e9c172da541d7bbbce0c2b99b33a | |
parent | 47a1f0897313bbde85051e939af0fc8220feb175 (diff) | |
download | pass-95d100938736d074a404a5f4d4ef1a38ceaab515.tar.gz pass-95d100938736d074a404a5f4d4ef1a38ceaab515.tar.bz2 pass-95d100938736d074a404a5f4d4ef1a38ceaab515.zip |
contrib: import passmenu
-rw-r--r-- | contrib/dmenu/README.md | 11 | ||||
-rwxr-xr-x | contrib/dmenu/passmenu | 12 | ||||
-rw-r--r-- | contrib/related-projects.txt | 3 |
3 files changed, 23 insertions, 3 deletions
diff --git a/contrib/dmenu/README.md b/contrib/dmenu/README.md new file mode 100644 index 0000000..8160b3c --- /dev/null +++ b/contrib/dmenu/README.md @@ -0,0 +1,11 @@ +`passmenu` is a [dmenu][]-based interface to [pass][], the standard Unix +password manager. This design allows you to quickly copy a password to the +clipboard without having to open up a terminal window if you don't already have +one open. + +# Usage + + passmenu [dmenu arguments...] + +[dmenu]: http://tools.suckless.org/dmenu/ +[pass]: http://www.zx2c4.com/projects/password-store/ diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu new file mode 100755 index 0000000..5d9d454 --- /dev/null +++ b/contrib/dmenu/passmenu @@ -0,0 +1,12 @@ +#!/bin/bash + +shopt -s nullglob globstar + +prefix=${PASSWORD_STORE_DIR-~/.password-store} +password_files=( "$prefix"/**/*.gpg ) +password_files=( "${password_files[@]#"$prefix"/}" ) +password_files=( "${password_files[@]%.gpg}" ) + +password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") + +[ $? -eq 0 ] && pass -c "$password" diff --git a/contrib/related-projects.txt b/contrib/related-projects.txt index a8c3b3e..e9b8fd4 100644 --- a/contrib/related-projects.txt +++ b/contrib/related-projects.txt @@ -5,6 +5,3 @@ The following projects make use of pass: * passff: A firefox plugin. <https://github.com/jvenant/passff> - -* passmenu: A dmenu script. - <https://github.com/cdown/passmenu> |