15 lines
308 B
Bash
Executable file
15 lines
308 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# 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="$(fd -t f -g '*' $MAILDIRNEW | wc -l)"
|
|
|
|
# Print count in i3/sway bar format
|
|
if [ $MAILNEW -ge 1 ]
|
|
then
|
|
echo $MAILNEW
|
|
fi
|