begin switch to mbsync
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user