blob: 2969cd16810583f62fa66afeeced15667f585a35 (
plain) (
tree)
|
|
# Pick and type out a pass(1) password with dmenu(1) and xdotool(1)
self=dmenu_pass
cd -- "${PASSWORD_STORE_DIR:-"$HOME"/.password-store}" || exit
# shellcheck disable=SC2016
name=$(
find . -name \*.gpg ! -type d |
sed -e 's_^\./__' -e 's_\.gpg$__' |
LC_ALL=C sort -f |
dmenu
)
[ -n "$name" ] || exit
password=$(pass show -- "$name" | head -n 1) || exit
[ -n "$password" ] || exit
printf %s "$password" | xdotool type --clearmodifiers --file - \
|| exit
notify-send --app-name="$self" -- \
"Password typed" \
"$name"
|