summaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rwxr-xr-xmail4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail b/mail
new file mode 100755
index 0000000..0fe7836
--- /dev/null
+++ b/mail
@@ -0,0 +1,4 @@
+#!/bin/sh
+NEW_MAIL="$(find "$HOME/.local/share/mail/$1/INBOX/new/" -type f 2> /dev/null | wc -l)"
+[ $NEW_MAIL -gt 0 ] && COLOR=$(echo '\003') || COLOR=''
+printf '%s%s%s\001' $COLOR " $2" $NEW_MAIL