|
@@ -57,7 +57,14 @@ esac |
|
|
syncandnotify() { |
|
|
syncandnotify() { |
|
|
acc="$(echo "$account" | sed "s/.*\///")" |
|
|
acc="$(echo "$account" | sed "s/.*\///")" |
|
|
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi |
|
|
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi |
|
|
new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null) |
|
|
|
|
|
|
|
|
new=$(find\ |
|
|
|
|
|
"$HOME/.local/share/mail/$acc/INBOX/new/"\ |
|
|
|
|
|
"$HOME/.local/share/mail/$acc/Inbox/new/"\ |
|
|
|
|
|
"$HOME/.local/share/mail/$acc/inbox/new/"\ |
|
|
|
|
|
"$HOME/.local/share/mail/$acc/INBOX/cur/"\ |
|
|
|
|
|
"$HOME/.local/share/mail/$acc/Inbox/cur/"\ |
|
|
|
|
|
"$HOME/.local/share/mail/$acc/inbox/cur/"\ |
|
|
|
|
|
-type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null) |
|
|
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) |
|
|
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) |
|
|
case 1 in |
|
|
case 1 in |
|
|
$((newcount > 5)) ) notify "$acc" "$newcount" ;; |
|
|
$((newcount > 5)) ) notify "$acc" "$newcount" ;; |
|
|