diff options
author | Urbain Vaes <urbain@vaes.uk> | 2016-01-22 16:52:03 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2016-01-22 16:52:03 +0000 |
commit | e9c25ee0bbbf2f97c223d037b83b89915db63999 (patch) | |
tree | 0efe84fc2968d0ebc22f7c6d5098bb04e8c8a1aa /bin/email | |
parent | fe054f7d5f4ffe6f6bf3121e821b7783c93d9ee2 (diff) |
Add script to fetch email
Diffstat (limited to 'bin/email')
-rwxr-xr-x | bin/email | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1,10 +1,6 @@ #! /usr/bin/env bash - -while true; -do - mbsync -a - nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) - [[ nmails -ge 1 ]] && notify-send -t 1 "New mail!" - date - sleep 5m -done +export DISPLAY=:0 +mbsync -a +nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) +[[ nmails -ge 1 ]] && /usr/bin/notify-send -t 1 "New mail!" || /usr/bin/notify-send -u low -t 1 "No new mail!" +echo "Email last checked on $(date)". |