From fb4c69743c9f2f26c3be51c620623298162cd5bb Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Sat, 27 Feb 2021 01:30:26 +0100 Subject: [PATCH] update and clean --- conf.d/notmuch/post-new | 26 ++++++++++++++++++++++++++ conf.d/notmuch/pre-new | 21 +++++++++++++++++++++ meta/tasks/mail.yaml | 4 ++++ 3 files changed, 51 insertions(+) create mode 100755 conf.d/notmuch/post-new create mode 100755 conf.d/notmuch/pre-new diff --git a/conf.d/notmuch/post-new b/conf.d/notmuch/post-new new file mode 100755 index 0000000..eec1661 --- /dev/null +++ b/conf.d/notmuch/post-new @@ -0,0 +1,26 @@ +#!/bin/bash +# File : post-new +# Author : Jeff LANCE +# Date : 10.02.2015 +# Last Modified Date: 26.02.2021 +# Last Modified By : Jeff LANCE + +ASTROID_BIN=$(which astroid) + +echo "[Begin notmuch]: $(basename $0)" + +echo "[----- notmuch]: local treatment" +notmuch tag --input=${HOME}/Mail/.notmuch/tagupdate + +echo "[----- notmuch]: afew treatment" +afew --tag --new +afew --move-mails + +echo "[End notmuch]: $(basename $0)" + +if [ "x${DISPLAY}" != "x" ]; then + logger -t notmuch "Astroid polling stop requested during post-new hook" + $ASTROID_BIN --stop-polling 2>&1 >/dev/null +fi + +# vim:ft=sh diff --git a/conf.d/notmuch/pre-new b/conf.d/notmuch/pre-new new file mode 100755 index 0000000..22c964f --- /dev/null +++ b/conf.d/notmuch/pre-new @@ -0,0 +1,21 @@ +#!/bin/bash +# File : pre-new +# Author : Jeff LANCE +# Date : 04.05.2020 +# Last Modified Date: 26.02.2021 +# Last Modified By : Jeff LANCE + +ASTROID_BIN=$(which astroid) + +echo "[Begin notmuch]: $(basename $0) script" + +if [ "x${DISPLAY}" != "x" ]; then + logger -t notmuch "Astroid polling start requested during pre-new hook" + $ASTROID_BIN --start-polling 2>&1 >/dev/null +fi + +echo "[End notmuch]: $(basename $0) script" + +exit 0 + +# vim:ft=sh diff --git a/meta/tasks/mail.yaml b/meta/tasks/mail.yaml index 1eb7b9d..ff30efe 100644 --- a/meta/tasks/mail.yaml +++ b/meta/tasks/mail.yaml @@ -23,4 +23,8 @@ path: conf/msmtprc ${HOME}/.notmuch-config: path: conf/notmuch-config + ${HOME}/Mail/.notmuch/hooks: + glob: true + force: true + path: conf.d/notmuch/*