From d0b9f13d8ade4e4f06c1f9750477512d403496a8 Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 16 Nov 2016 11:09:59 +0300 Subject: [PATCH] notifications for dmenu_pass --- dmenu_pass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dmenu_pass b/dmenu_pass index 13d10fb..13eee09 100755 --- a/dmenu_pass +++ b/dmenu_pass @@ -19,6 +19,13 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu -p pass "$@") if [[ $typeit -eq 0 ]]; then pass show -c "$password" 2>/dev/null + returns=$? + if (( returns )); then + msg="failed" + else + msg="copied" + fi + notify-send -a "pass" "$msg" "$password" else pass show "$password" | { read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --file - fi