prepare for new laptop
[dotfiles.git] / email / .local / bin / newmail.sh
index 8d8c35c..16c2888 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/sh
-newmail="$(find ~/.local/share/mutt/mail/INBOX/new/ -type f | wc -l)"
-if [ "$newmail" -ne 0 ]
+notmuch new
+killall -s SIGUSR1 slstatus
+if [ "$OFFLINEIMAPSYNCMODE" = full ]
 then
-       notify-send "$newmail new emails!"
+       vdirsyncer sync --max-workers=1
 fi
-notmuch new
-vdirsyncer sync