diff options
author | Ben Sima <ben@bsima.me> | 2018-06-13 21:36:56 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2018-06-13 21:36:56 -0700 |
commit | 77c9a177b2b595d4ce25095b58e2388fe33cc97a (patch) | |
tree | 0853d5c92d67538760005b9c4635a90115bd7ba4 /eml |
init
Diffstat (limited to 'eml')
-rwxr-xr-x | eml | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +eml(){ + maildirs="$HOME/Mail/*/INBOX/new/" + find $maildirs -type f | wc -l +} + +case "$1" in + -n) m=$(eml) + if ((m > 0)); then + notify-send "New mail" "$m messages" + fi + ;; + *) eml ;; +esac |