summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-04-11 13:39:47 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-04-11 13:39:47 -0400
commit83029cfee09ce758b3c775d8ba4fb002f0f83aa4 (patch)
tree61c335f55062df0a1346c931ac4c6231ef10ba19 /bin
parent96e582a817a9bd0f73a420d6ebc40c7b94360b0d (diff)
begin switch to mbsync
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mailsync8
1 files changed, 4 insertions, 4 deletions
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"