summaryrefslogtreecommitdiff
path: root/sync-mail
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2017-07-05 07:55:02 +0200
committerPatrick Simianer <p@simianer.de>2017-07-05 07:55:02 +0200
commit385f9032d949274f61c2e83bc0a376af3c1421b6 (patch)
treebc5a1fc44d8d05aba33927736a54fe88d6bdab1d /sync-mail
parent6502b84244f232cbe97056da6585b16ed9c1f475 (diff)
sync-mail: compat
Diffstat (limited to 'sync-mail')
-rwxr-xr-xsync-mail13
1 files changed, 11 insertions, 2 deletions
diff --git a/sync-mail b/sync-mail
index c5345a0..41af354 100755
--- a/sync-mail
+++ b/sync-mail
@@ -1,7 +1,13 @@
#!/bin/zsh -x
+if [[ $(uname) == "Darwin" ]]; then
+ export PATH=/Users/$(whoami)/.local/bin:$PATH
+fi
+
$(which imapfilter) -c $HOME/.imapfilter/private.lua 2>/dev/null
-$(which imapfilter) -c $HOME/.imapfilter/work.lua 2>/dev/null
+if [[ ! -f ~/.holiday ]]; then
+ $(which imapfilter) -c $HOME/.imapfilter/work.lua 2>/dev/null
+fi
case `date +"%a"` in
Sat|Sun)
@@ -24,7 +30,10 @@ then
if [[ $(uname) == "Linux" ]]; then
export DISPLAY=:0
export XAUTHORITY=$HOME/.Xauthority;
- /usr/bin/notify-send "You've got mail."
+ /usr/bin/notify-send "You got mail ($new)."
+ fi
+ if [[ $(uname) == "Darwin" ]]; then
+ osascript -e "display notification \"$new new mails.\" with title \"You got mail.\""
fi
fi