From 83029cfee09ce758b3c775d8ba4fb002f0f83aa4 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 11 Apr 2019 13:39:47 -0400 Subject: begin switch to mbsync --- bin/mailsync | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/mailsync') diff --git a/bin/mailsync b/bin/mailsync index 24b5e10..8d3052a 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -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" -- cgit v1.2.3