myhome/.local/bin/sb-mail
Marcin Woźniak b82dc58f26
Added programs
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2021-03-22 21:27:54 +01:00

7 lines
279 B
Bash
Executable File

#!/bin/bash
print_mail(){
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
icon="$(cat "/tmp/imapsyncicon_$USER" 2>/dev/null)"
[ "$unread" = "1" ] && [ "$icon" = "" ] || echo "📬 $unread$icon"
}
print_mail