blob: 92324c6cc8f5447e8f67318792b138586bd57883 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/sh
# Displays number of unread mail and an loading icon if updating.
# When clicked, brings up `neomutt`.
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/*/new/* -type f | wc -l 2>/dev/null)"
# [ "$unread" = "0" ] && [ "$icon" = "" ] || echo " $unread"
#
[ "$unread" = "0" ] && [ "$icon" = "" ] || printf '{"text":" %s", "class":"block"}\n' "$unread"
|