Created
March 25, 2016 15:10
-
-
Save mkazlauskas/ebbe7bd0e74c56365d07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Workaround to set mail as read using astroid | |
set -e | |
echo "[mailsync]: hack" | |
ls ~/Mail | while read x; do | |
notmuch tag +unread +reunread -- path:$x/INBOX/new/** and not tag:unread | |
notmuch tag -unread -reunread -- tag:reunread | |
done | |
echo "[mailsync]: offlineimap" | |
offlineimap -o -u quiet | |
echo "[mailsync]: notmuch new" | |
notmuch new | |
# TODO: use 'new' tag to show notification | |
echo "[mailsync]: done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment