summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/bin/email2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/bin/email b/bin/bin/email
index 84e923e..c0db4bd 100755
--- a/bin/bin/email
+++ b/bin/bin/email
@@ -7,9 +7,9 @@ export DISPLAY=:0
mbsync -a
new_mails=$(find $HOME/.mail -path '*/new/*' -type f)
-subjects=$(cat $(echo -e ${new_mails/'\n'/' '}) | grep "^Subject: " | sed "s/^Subject: //g")
if [[ ! -z ${new_mails} ]]; then
+ subjects=$(cat $(echo -e ${new_mails/'\n'/' '}) | grep "^Subject: " | sed "s/^Subject: //g")
/usr/bin/notify-send -t 3 "New mail(s)!" "${subjects}"
fi