mutt-wizard

fork of Luke Smiths mutt-wizard
git clone git://git.jakekoroman.com/mutt-wizard
Log | Files | Refs | README | LICENSE

commit 685674c33e8ad0839d9eed7873df64e0314caa45
parent 2be8ea7871e6d07592d7b4ed85ace213774261f6
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Thu,  9 Sep 2021 19:38:16 -0400

Merge pull request #762 from TheChymera/master

Check both new and cur dirs for notification
Diffstat:
Mbin/mailsync | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bin/mailsync b/bin/mailsync @@ -57,7 +57,14 @@ esac syncandnotify() { acc="$(echo "$account" | sed "s/.*\///")" if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi - new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null) + new=$(find\ + "$HOME/.local/share/mail/$acc/INBOX/new/"\ + "$HOME/.local/share/mail/$acc/Inbox/new/"\ + "$HOME/.local/share/mail/$acc/inbox/new/"\ + "$HOME/.local/share/mail/$acc/INBOX/cur/"\ + "$HOME/.local/share/mail/$acc/Inbox/cur/"\ + "$HOME/.local/share/mail/$acc/inbox/cur/"\ + -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) case 1 in $((newcount > 5)) ) notify "$acc" "$newcount" ;;