summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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"