1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/polybar/.local/bin/mailcount

16 lines
238 B
Bash
Executable File

#!/usr/bin/env sh
unread="$(find ~/.local/share/mail/*/INBOX/new/* -type f 2>/dev/null | wc -l)"
if [ ! "$(pgrep -x mbsync)" ]; then
icon=""
else
icon="痢"
fi
if [ ! "$unread" -eq 0 ]; then
echo "$icon $unread"
else
echo ""
fi