Update “mail-count.sh” to use “fd”
This commit is contained in:
parent
d983206785
commit
f586eaa8a2
1 changed files with 6 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue