summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-11-15 12:59:59 +0100
committerRobert Günzler <r@gnzler.io>2021-11-15 12:59:59 +0100
commit3cf45c29b17f8cc2f41e586de3463250e79007f0 (patch)
tree0af26f3ecf94a2a13284cc535c36f7816bb91c00 /bin
parent2ac874c47b88ddd246dc6a75a3133543dee11cb4 (diff)
passmenu: handle pass failures better
Diffstat (limited to 'bin')
-rwxr-xr-xbin/passmenu4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/passmenu b/bin/passmenu
index 3b3fee2..e81a29a 100755
--- a/bin/passmenu
+++ b/bin/passmenu
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-set -e
+set -eo pipefail
 [ -n "$DEBUG" ] && set -x
 
+trap '{ notify-send -a passmenu -i "$(iconez -n form-textbox-passworrd)" -c error "passmenu: failed :(" "<i>pipefail</i>"; exit 1; }' ERR
+
 # check requirements
 for tool in bemenu fd fzf; do
 	if ! command -v "$tool" >/dev/null; then