From f586eaa8a2f91fbea43243b833c629e695a2f136 Mon Sep 17 00:00:00 2001 From: Olli Date: Sun, 15 Mar 2026 15:41:09 +0100 Subject: [PATCH] =?UTF-8?q?Update=20=E2=80=9Cmail-count.sh=E2=80=9D=20to?= =?UTF-8?q?=20use=20=E2=80=9Cfd=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mail-count.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mail-count.sh b/mail-count.sh index 4ff49d1..2823d58 100755 --- a/mail-count.sh +++ b/mail-count.sh @@ -1,17 +1,15 @@ #!/bin/sh -# Count the number of unread emails and return the count in the i3/sway bar -# format. +# Count the number of unread emails and return the count in the i3/sway bar format. # Settings MAILDIRNEW="$HOME/Dokumente/eMails/*/INBOX/new/" # Count new mails -MAILNEW="$(find $MAILDIRNEW -type f | wc -l)" +MAILNEW="$(fd -t f -g '*' $MAILDIRNEW | wc -l)" # Print count in i3/sway bar format -echo $MAILNEW -echo $MAILNEW -[ ${MAILNEW} -ge 1 ] && exit 33 - -exit 0 +if [ $MAILNEW -ge 1 ] +then + echo $MAILNEW +fi