summaryrefslogtreecommitdiff
path: root/offlineimap-notification
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-09-21 08:13:58 +0200
committerPatrick Simianer <p@simianer.de>2016-09-21 08:13:58 +0200
commitef7e7ba972b49b32be396b765ff3055e76ac8dd8 (patch)
treef5f2c06a684b8d41750e9280165dff23068c0633 /offlineimap-notification
parent5b2a02e77f3e4074b4594033b97aa6cfbfcfc1c8 (diff)
offlineimap-notification
Diffstat (limited to 'offlineimap-notification')
-rwxr-xr-xofflineimap-notification11
1 files changed, 11 insertions, 0 deletions
diff --git a/offlineimap-notification b/offlineimap-notification
new file mode 100755
index 0000000..35abb24
--- /dev/null
+++ b/offlineimap-notification
@@ -0,0 +1,11 @@
+#!/usr/bin/zsh
+
+new="$(find $HOME/.mail/*/*/new/ -type f | wc -l)"
+old="$(find $HOME/.mail/*/*/cur/ -type f | wc -l)"
+
+if [ $new -gt 0 ]
+then
+ export DISPLAY=:0; export XAUTHORITY=~/.Xauthority;
+ notify-send "You've got mail."
+fi
+