diff options
Diffstat (limited to 'etc/mailsync.sh')
-rwxr-xr-x | etc/mailsync.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/mailsync.sh b/etc/mailsync.sh index 2ac78d9..9f6f3c6 100755 --- a/etc/mailsync.sh +++ b/etc/mailsync.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # This script will run offlineimap and check # for new email if there is an internet connection. # @@ -20,8 +20,13 @@ else notify() { pgrep -x dunst && notify-send -i ~/.config/mutt/etc/email.gif "$2 new mail(s) in \`$1\` account." ;} fi +echo 🔃 > ~/.config/mutt/.dl +pkill -RTMIN+12 i3blocks + # Run offlineimap. You can feed this script different settings. offlineimap -o "$@" +rm -f ~/.config/mutt/.dl +pkill -RTMIN+12 i3blocks # Check all accounts/mailboxes for new mail. Notify if there is new content. for account in $(ls ~/.mail) @@ -32,7 +37,6 @@ do then notify "$account" "$newcount" & disown mpv --quiet ~/.config/mutt/etc/notify.opus - pkill -RTMIN+12 i3blocks # For my i3blocks setup. Updates new mail counter. fi done |