From f4874d08edfb2d7ffabd77cebc4b30c6cb7c1d2b Mon Sep 17 00:00:00 2001 From: badmrfrosty <49749436+badmrfrosty@users.noreply.github.com> Date: Thu, 18 Apr 2019 11:46:38 +0200 Subject: [PATCH] Update mailsync to have it look in "inbox" and "Inbox" Several email providers name their inbox folder with a wide usage of lowercase or uppercase letters (INBOX, inbox, Inbox). This commit makes mailsync.sh looks in different folders so that the notification works properly whenever there is a new email in INBOX, Inbox or inbox --- etc/mailsync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mailsync.sh b/etc/mailsync.sh index 6068464..c566166 100755 --- a/etc/mailsync.sh +++ b/etc/mailsync.sh @@ -31,7 +31,7 @@ pkill -RTMIN+12 i3blocks for account in $(ls ~/.mail) do #List unread messages newer than last mailsync and count them - newcount=$(find ~/.mail/"$account"/INBOX/new/ -type f -newer ~/.config/mutt/etc/.mailsynclastrun 2> /dev/null | wc -l) + newcount=$(find ~/.mail/"$account"/INBOX/new/ ~/.mail/"$account"/inbox/new/ ~/.mail/"$account"/Inbox/new/ -type f -newer ~/.config/mutt/etc/.mailsynclastrun 2> /dev/null | wc -l) if [ "$newcount" -gt "0" ] then notify "$account" "$newcount" &