diff options
author | Joe <bousset.rudy@gmail.com> | 2022-09-23 18:05:52 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-09-23 18:05:52 +0200 |
commit | bb4a92e4c29cfb8250ae0852bbbb9162c94efb66 (patch) | |
tree | 7f01d9943a59d3a0fa7467e1d2e01783a5374d92 /.local/bin/fetch_mail.sh | |
parent | up (diff) | |
download | dotfiles-bsd-bb4a92e4c29cfb8250ae0852bbbb9162c94efb66.tar.gz dotfiles-bsd-bb4a92e4c29cfb8250ae0852bbbb9162c94efb66.tar.bz2 dotfiles-bsd-bb4a92e4c29cfb8250ae0852bbbb9162c94efb66.tar.xz dotfiles-bsd-bb4a92e4c29cfb8250ae0852bbbb9162c94efb66.tar.zst dotfiles-bsd-bb4a92e4c29cfb8250ae0852bbbb9162c94efb66.zip |
good config
Diffstat (limited to '.local/bin/fetch_mail.sh')
-rwxr-xr-x | .local/bin/fetch_mail.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.local/bin/fetch_mail.sh b/.local/bin/fetch_mail.sh index 1f2889b..c30e309 100755 --- a/.local/bin/fetch_mail.sh +++ b/.local/bin/fetch_mail.sh @@ -11,9 +11,10 @@ mc_file="/tmp/newmailcount" if [ -f $mc_file ]; then pre_count=$(cat $mc_file) else - pre_count="$(ls "${MAIL:-/var/mail/jozan}"/bousset.rudy@gmail.com/INBOX/new | wc -l 2>/dev/null)" - tmp="$(ls "${MAIL:-/var/mail/jozan}"/olsen.oyvind.nor@gmail.com/INBOX/new | wc -l 2>/dev/null)" - pre_count="$((pre_count + tmp))" + pre_count="$(ls "${MAIL:-/var/mail/jozan}"/main/INBOX/new | wc -l 2>/dev/null)" + tmp1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)" + tmp2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)" + pre_count="$((pre_count + tmp1 + tmp2))" fi killall mbsync >/dev/null 2>&1 # notify-send -u low -t 3000 'mbsync' ' fetching mail...' >/dev/null 2>&1 @@ -24,9 +25,10 @@ killall mbsync >/dev/null 2>&1 gsleep 0.2 kill -74 $(pidof dwmblocks) >/dev/null 2>&1 fg -post_count="$(ls "${MAIL:-/var/mail/jozan}"/bousset.rudy@gmail.com/INBOX/new | wc -l 2>/dev/null)" -tmp="$(ls "${MAIL:-/var/mail/jozan}"/olsen.oyvind.nor@gmail.com/INBOX/new | wc -l 2>/dev/null)" -post_count="$((post_count + tmp))" +post_count="$(ls "${MAIL:-/var/mail/jozan}"/main/INBOX/new | wc -l 2>/dev/null)" +tmp1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)" +tmp2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)" +post_count="$((post_count + tmp1 + tmp2))" if [ $post_count -gt $pre_count ]; then notify-send -u normal 'NeoMutt' ' '$post_count' new mail(s)' fi |