Pārlūkot izejas kodu

Add option to get notifications for non-standard mailboxes

pull/731/head
sdoering01 pirms 3 gadiem
vecāks
revīzija
05b651d081
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 8C842169EB0F9FFE
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. +2
    -1
      bin/mailsync

+ 2
- 1
bin/mailsync Parādīt failu

@@ -57,7 +57,8 @@ esac
syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")"
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)
boxes="INBOX|Inbox|inbox$(sed -E 's/^(.+)/\|\1/' "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/notification_inboxes" 2> /dev/null | tr -d '\n')"
new=$(find "$HOME/.local/share/mail/$acc" -regextype posix-egrep -regex ".*($boxes)/new.*" -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
case 1 in
$((newcount > 5)) ) notify "$acc" "$newcount" ;;


Notiek ielāde…
Atcelt
Saglabāt