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

16 lines
268 B
Bash

#!/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 "%{F#666}%{F-}"
fi