From cab073ae08de3da46c6bf7b8c14e53a330b4ed9c Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Tue, 19 May 2020 18:51:14 -0400 Subject: hiding certain blocks when nothing to report --- i3blocks-mail.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'i3blocks-mail.sh') diff --git a/i3blocks-mail.sh b/i3blocks-mail.sh index b370f24..2ec5d14 100755 --- a/i3blocks-mail.sh +++ b/i3blocks-mail.sh @@ -1,5 +1,6 @@ #!/bin/sh icon=󰶋 -unread=$(ls -l ~/.mail/gmail/Inbox/new | wc -l | cut -w -f2) -[ $unread -gt 0 ] && printf "%s%s\n" $icon $unread && notify-send "$unread unread email(s)" +unread=$(ls ~/.mail/gmail/Inbox/new/ | wc -l | cut -w -f2) +[ $unread -gt 0 ] && printf "%s%s" $icon $unread && notify-send "$unread unread email(s)" +printf "\n" -- cgit v1.2.3