use pidof to check for syncs

This commit is contained in:
Luke Smith 2020-05-25 20:52:08 -04:00
parent 06fb70a6cb
commit 31f26c73b0
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -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"