summaryrefslogtreecommitdiff
path: root/.config/eww/scripts
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-03-14 20:32:43 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-03-14 20:32:43 +0100
commit08446721e101e18fc49a489fe37e57a4ffc9731e (patch)
treefb82a3a20ed0a47b3cb1cd5e8975a6f6ac406533 /.config/eww/scripts
parentbf3dd87bd7df516c1f845c56e6012bcd9bdf4f68 (diff)
eww: Change how icons are displayed
Diffstat (limited to '.config/eww/scripts')
-rwxr-xr-x.config/eww/scripts/email-listener14
1 files changed, 7 insertions, 7 deletions
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