diff options
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/status/sb-mailbox | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/.local/bin/status/sb-mailbox b/.local/bin/status/sb-mailbox index ed41b03..21a9ab0 100755 --- a/.local/bin/status/sb-mailbox +++ b/.local/bin/status/sb-mailbox @@ -13,8 +13,21 @@ case $BLOCK_BUTTON in 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac -unread="$(ls "${MAIL:-/var/mail/jozan}"/bousset.rudy@gmail.com/INBOX/new/ | wc -l 2>/dev/null)" +icon="" -pidof mbsync >/dev/null 2>&1 && icon="" -[ "$icon" = "" ] && icon="" -[ "$unread" -eq 0 ] || echo "$icon " $unread +mb_a="$(ls "${MAIL:-/var/mail/jozan}"/bousset.rudy@gmail.com/INBOX/new/ | wc -l 2>/dev/null)" +if [ "$mb_a" -gt 0 ]; then + echo -n " $icon A:" $mb_a +fi + +mb_b="$(ls "${MAIL:-/var/mail/jozan}"/olsen.oyvind.nor@gmail.com/INBOX/new/ | wc -l 2>/dev/null)" +if [ "$mb_b" -gt 0 ]; then + echo -n " $icon B:" $mb_b +fi + +mb_c="$(ls "${MAIL:-/var/mail/jozan}"/rbousset@secuserve.com/INBOX/new/ | wc -l 2>/dev/null)" +if [ "$mb_c" -gt 0 ]; then + echo -n " $icon C:" $mb_c +fi + +pidof mbsync >/dev/null 2>&1 && echo " " |