From b240e5e5d6c6881ab7f2fbc428f3dc566492aafe Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sun, 30 May 2021 17:15:41 +0200 Subject: [PATCH] only show "cleared password" prompt if succesfull gpg masterpassword entried --- .local/bin/tools/passmenu2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/tools/passmenu2 b/.local/bin/tools/passmenu2 index 5afbc24..cfcda87 100755 --- a/.local/bin/tools/passmenu2 +++ b/.local/bin/tools/passmenu2 @@ -53,7 +53,8 @@ while [ "$DONE" -eq 0 ] ; do sed -e "s/^/\"/" -e "s/$/\"/" $HOME/.cache/passstring | xargs -r notify-send "Password" -t 4000 sleep 45 if [ -f $HOME/.cache/passstring ]; then - notify-send "Password" "password cleared from clipboard" -t 4000 + [ "$(wc -l "$HOME/.cache/passstring" | cut -d' ' -f1 )" -gt 0 ] && + notify-send "Password" "password cleared from clipboard" -t 4000 rm $HOME/.cache/passstring fi