From 08446721e101e18fc49a489fe37e57a4ffc9731e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 14 Mar 2024 20:32:43 +0100 Subject: eww: Change how icons are displayed --- .config/eww/scripts/email-listener | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '.config/eww/scripts') diff --git a/.config/eww/scripts/email-listener b/.config/eww/scripts/email-listener index a5444c8..41693f3 100755 --- a/.config/eww/scripts/email-listener +++ b/.config/eww/scripts/email-listener @@ -14,24 +14,24 @@ count() case $sum in 0) - printf 'No Mail' + printf 'icon=\ntext=No Email' ;; 1) - printf '1 Mail' + printf 'icon=\ntext=1 Email' ;; *) - printf '%d Mails' $sum + printf 'icon=\ntext=%d Emails' $sum ;; esac [ $new -gt 0 ] && printf ' (%d Unread)' $new echo - echo $new >"$CACHE" } { - while sleep 1 + while : do + sleep 1 read new_mails <"$CACHE" if [ $new_mails -gt ${prev:=0} ] then @@ -55,14 +55,14 @@ count() done } & -count +count | jo inotifywait -qm "$MAILDIR"/*/Inbox/new "$MAILDIR"/*/Inbox/cur \ | while read _ event _ do case "$event" in CREATE|DELETE|MOVED_*) - count + count | jo ;; esac done -- cgit v1.2.3