summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 6856bce..2d341a0 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -1016,6 +1016,13 @@ By default, returns all jabber related buffers format."
:hook ((notmuch-hello-mode . (lambda () (display-line-numbers-mode 0)))
(notmuch-search-mode . (lambda () (display-line-numbers-mode 0) (emojify-mode))))
:config
+ (defun thanos/notmuch-decrypt-script ()
+ (let ((encrypted-script (expand-file-name "notmuch-hook.sh.gpg" "~/.scripts"))
+ (script (expand-file-name "notmuch-hook.sh" "~/.scripts")))
+ (unless (file-exists-p script)
+ (epa-decrypt-file encrypted-script script)
+ (set-file-modes script #o700))))
+
(defun thanos/notmuch-update ()
(interactive)
(let ((default-directory "~/")
@@ -1025,6 +1032,7 @@ By default, returns all jabber related buffers format."
(split-window-vertically (- height))
(other-window 1)
(switch-to-buffer new-buffer)
+ (thanos/notmuch-decrypt-script)
(let ((proc (async-shell-command command new-buffer)))
(set-process-sentinel
(get-buffer-process new-buffer)