mailbox icon moved to script

This commit is contained in:
Luke Smith 2020-02-08 19:28:25 -05:00
parent 2b5df860de
commit 6c200b8850
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
2 changed files with 5 additions and 2 deletions

View file

@ -34,7 +34,6 @@ interval=18000
signal=5
[mailbox]
label=📬
interval=180
signal=12

View file

@ -13,4 +13,8 @@ case $BLOCK_BUTTON in
- Middle click syncs mail" ;;
esac
echo "$(du -a ~/.local/share/mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)"
unread="$(find ~/.local/share/mail/*/INBOX/new/* -type f | wc -l 2>/dev/null)"
icon="$(cat "/tmp/imapsyncicon_$USER")"
[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "📬 $unread$(cat "/tmp/imapsyncicon_$USER" 2>/dev/null)"