notifications for dmenu_pass

This commit is contained in:
Von Random 2016-11-16 11:09:59 +03:00
parent 5c2c99db25
commit d0b9f13d8a

View file

@ -19,6 +19,13 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu -p pass "$@")
if [[ $typeit -eq 0 ]]; then if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null pass show -c "$password" 2>/dev/null
returns=$?
if (( returns )); then
msg="failed"
else
msg="copied"
fi
notify-send -a "pass" "$msg" "$password"
else else
pass show "$password" | { read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --file - pass show "$password" | { read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --file -
fi fi