Files
random-scripts/status-bar/sb-mu4e-messages
T
2025-11-28 17:06:04 -08:00

12 lines
308 B
Bash
Executable File

#!/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)"})
if [[ ${#lines} > 0 ]] || ! (( greather_than_zero )); then
printf '%d' "${#lines}"
fi