only show "cleared password" prompt if succesfull gpg masterpassword entried

This commit is contained in:
Alexander Bocken 2021-05-30 17:15:41 +02:00
parent 614f381831
commit b240e5e5d6
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -53,7 +53,8 @@ while [ "$DONE" -eq 0 ] ; do
sed -e "s/^/\"/" -e "s/$/\"/" $HOME/.cache/passstring | xargs -r notify-send "Password" -t 4000 sed -e "s/^/\"/" -e "s/$/\"/" $HOME/.cache/passstring | xargs -r notify-send "Password" -t 4000
sleep 45 sleep 45
if [ -f $HOME/.cache/passstring ]; then 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 rm $HOME/.cache/passstring
fi fi