From ef7e7ba972b49b32be396b765ff3055e76ac8dd8 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Wed, 21 Sep 2016 08:13:58 +0200 Subject: offlineimap-notification --- offlineimap-notification | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 offlineimap-notification (limited to 'offlineimap-notification') 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 + -- cgit v1.2.3