diff options
author | Thanos Apollo <[email protected]> | 2024-07-29 19:59:39 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-07-29 19:59:39 +0300 |
commit | f9df24591f2fd926594d3066259cea2648fd135d (patch) | |
tree | 3bef93631cb288b0f10b5c043b8d595dff1ab494 /.config/emacs | |
parent | 29ac79ea07739ca88fb5870cf431d87a94e625d1 (diff) |
emacs: notmuch: Add func to decrypt notmuch script hook.
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/init.el | 8 |
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) |