Compare commits

...

2 Commits

Author SHA1 Message Date
David JULIEN 1e14001c09
Merge branch 'dev' into gentoo 5 months ago
David JULIEN b029349860 [mail] enhance scan for new mail 5 months ago
  1. 2
      .local/bin/mailsync
  2. 2
      .local/bin/statusbar/sb-mailbox

2
.local/bin/mailsync

@ -40,7 +40,7 @@ messageinfo() {
syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")"
mbsync "$acc"
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/[Ii][Nn][Bb][Oo][Xx]/new/* -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2>/dev/null)"
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/* -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" | grep -iv "trash" 2>/dev/null)"
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
if [ "$newcount" -gt "0" ]; then
for file in $new; do

2
.local/bin/statusbar/sb-mailbox

@ -13,7 +13,7 @@
unread=""
for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/)
do
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/* -type f | grep -iv "trash" | wc -l 2>/dev/null)"
if [ $new -gt 0 ]; then
[ -n "$(echo "$acc" | sed -n '/@ens/p')" ] && box=""
[ -n "$(echo "$acc" | sed -n '/@mailo/p')" ] && box=""

Loading…
Cancel
Save