From 31f26c73b08bfbe112228c743631e9534ed6b75d Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 25 May 2020 20:52:08 -0400 Subject: [PATCH] use pidof to check for syncs --- .local/bin/statusbar/mailbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/mailbox b/.local/bin/statusbar/mailbox index d04b971..8f87d75 100755 --- a/.local/bin/statusbar/mailbox +++ b/.local/bin/statusbar/mailbox @@ -15,6 +15,6 @@ esac unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)" -icon="$(cat "/tmp/imapsyncicon_$USER" 2>/dev/null)" +pidof mbsync >/dev/null 2>&1 && icon="🔃" [ "$unread" = "0" ] && [ "$icon" = "" ] || echo "📬$unread$icon"