dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 570ca4089576f0038e3ef7d3d9bb9fdde2f9547a
parent a01f2cdb3c29ea680aad5bc1f0875e641ce6607e
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue, 14 Jul 2020 21:40:33 +0100

sync imap script, run by cron. notify of new mails

Diffstat:
Abin/bin/mail_sync | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/bin/bin/mail_sync b/bin/bin/mail_sync @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +mail_dir="$HOME/lib/doc/email" + +offlineimap -f INBOX >/dev/null 2>&1 +sleep 5 + +for inbox in pyratebeard octotech ; do + new_mail=$(ls -l ${mail_dir}/${inbox}/INBOX/new | wc -l) + let new_mail=new_mail-1 + if [ ${new_mail} -gt 0 ] ; then + /usr/bin/notify-send -u 'normal' "${new_mail} new mail(s) for ${inbox}" + fi +done