2 次程式碼提交

作者 SHA1 備註 提交日期
  Luke Smith 685674c33e
Merge pull request #762 from TheChymera/master 2 年之前
  Horea Christian 5971fadec8 Check both new and cur dirs for notification 2 年之前
共有 1 個檔案被更改,包括 8 行新增1 行删除
分割檢視
  1. +8
    -1
      bin/mailsync

+ 8
- 1
bin/mailsync 查看文件

@@ -57,7 +57,14 @@ 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)
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)
case 1 in
$((newcount > 5)) ) notify "$acc" "$newcount" ;;


Loading…
取消
儲存