#!/bin/sh
case $BLOCK_BUTTON in
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
mailicon=$(echo -en "\uf0e0")
pidof mbsync >/dev/null 2>&1 && icon=$(echo -en "\uf2f1")
# [ "$unread" = "0" ] && [ "$icon" = "" ] || echo -e "$mailicon $unread $icon"
[ "$unread" = "0" ] || echo -e "$mailicon $unread $icon"