#!/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