From 700f474f77594b339b76e1e7ff4aa9739a06d3eb Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Fri, 2 Jun 2023 18:58:42 +0200 Subject: [PATCH] [notmuch] Add refresh script. --- conf/home/emacs.scm | 3 ++- email/.local/mail/.hooks/pre-new | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 email/.local/mail/.hooks/pre-new diff --git a/conf/home/emacs.scm b/conf/home/emacs.scm index 72e5302..8581f11 100644 --- a/conf/home/emacs.scm +++ b/conf/home/emacs.scm @@ -88,7 +88,8 @@ msmtp)) (dotfiles (list "bash/.config/profile.d/50-notmuch.sh" - "emacs/.config/emacs/conf/conf-email.el"))))) + "emacs/.config/emacs/conf/conf-email.el" + "email/.local/mail/.hooks/pre-new"))))) (define emacs-keys-service (service home-program-service-type diff --git a/email/.local/mail/.hooks/pre-new b/email/.local/mail/.hooks/pre-new new file mode 100755 index 0000000..f1821f1 --- /dev/null +++ b/email/.local/mail/.hooks/pre-new @@ -0,0 +1,6 @@ +#!/bin/sh +# Copyright (c) 2022-2023 Jakub Czajka +# License: GPL-3.0 or later. + +notmuch search --output=files tag:deleted | xargs -l rm +mbsync --config ~/.config/isync/mbsyncrc --all -- 2.39.5