begin switch to mbsync

This commit is contained in:
Luke Smith
2019-04-11 13:39:47 -04:00
parent 96e582a817
commit 83029cfee0
3 changed files with 46 additions and 61 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env sh
# This script will run offlineimap and check
# This script will run mbsync and check
# for new email if there is an internet connection.
#
# If it detects new mail, it uses mpv to play a
@ -22,8 +22,8 @@ fi
echo " 🔃" > /tmp/imapsyncicon
pkill -RTMIN+12 i3blocks
# Run offlineimap. You can feed this script different settings.
offlineimap -o "$@"
# Run mbsync. You can feed this script different settings.
mbsync -a "$@"
rm -f /tmp/imapsyncicon
pkill -RTMIN+12 i3blocks
@ -34,7 +34,7 @@ do
newcount=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" -type f -newer "$HOME/.config/mutt/bin/.mailsynclastrun" 2> /dev/null | wc -l)
[ "$newcount" -gt "0" ] && notify "$acc" "$newcount" &
done
notmuch new
notmuch new 2>/dev/null
#Create a touch file that indicates the time of the last run of mailsync
touch "$HOME/.config/mutt/bin/.mailsynclastrun"