feat: show unread mails count per account in statusbar
This commit is contained in:
parent
7ef29fb98f
commit
bdef14fd32
@ -10,7 +10,17 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
|
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)"
|
||||||
|
if [ -n "$new" ]; then
|
||||||
|
[ -n "$(echo "$acc" | sed -n '/@etu/p')" ] && box=""
|
||||||
|
[ -n "$(echo "$acc" | sed -n '/@posteo/p')" ] && box=""
|
||||||
|
unread="$unread/$box:$new"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[ -n "$unread" ] && unread="($(echo "$unread" | cut -c 2-))" || unread="---"
|
||||||
|
|
||||||
pidof mbsync >/dev/null 2>&1 && icon=""
|
pidof mbsync >/dev/null 2>&1 && icon=""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user