1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-05 05:01:43 +00:00
dotfiles/scripts/.bin/passmenu

20 lines
404 B
Plaintext
Raw Normal View History

2014-06-26 16:07:56 +00:00
#!/bin/bash
shopt -s nullglob globstar
2016-01-07 11:53:04 +00:00
if command -v myrofi >/dev/null 2>&1;
2016-01-07 11:53:04 +00:00
then
program="myrofi -no-show-icons -dmenu"
2016-01-07 11:53:04 +00:00
else
program="dmenu"
fi
2014-06-26 16:07:56 +00:00
password_files=( ~/.password-store/**/*.gpg )
password_files=( "${password_files[@]##*/.password-store/}" )
password_files=( "${password_files[@]%.gpg}" )
2016-01-07 11:53:04 +00:00
password=$(printf '%s\n' "${password_files[@]}" | $program "$@")
2014-06-26 16:07:56 +00:00
2015-03-10 16:30:06 +00:00
pass show -c "$password"