coderkun
68319d2b55
Add POSIX compliant sh version of the mail-count script. Additionally add comments to the bash version.
18 lines
330 B
Bash
Executable file
18 lines
330 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# 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)"
|
|
|
|
# Print count in i3/sway bar format
|
|
echo $MAILNEW
|
|
echo $MAILNEW
|
|
[ ${MAILNEW} -ge 1 ] && exit 33
|
|
|
|
exit 0
|