Update for waybar

This commit is contained in:
2025-10-09 22:40:38 -07:00
parent d7fbed68bf
commit 5b551a4075
5 changed files with 31 additions and 7 deletions

View File

@ -1,4 +1,11 @@
#!/usr/bin/env zsh
let greather_than_zero=0
if [[ "${1}" == '-g' ]]; then
greather_than_zero=1
fi
lines=(${(f)"$(mu find '(maildir:/protonmail/Inbox or maildir:/ucsc-gmail/Inbox) AND flag:unread' 2>/dev/null)"})
printf '%d' "${#lines}"
if [[ ${#lines} > 0 ]] || ! (( greather_than_zero )); then
printf '%d' "${#lines}"
fi