From acef51b7d6ed442eac1da15860383aa505f4d308 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 7 Jan 2024 10:03:25 -0500 Subject: [PATCH] ADD mu sync script --- bin/mu-index-emacs-maybe | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/mu-index-emacs-maybe diff --git a/bin/mu-index-emacs-maybe b/bin/mu-index-emacs-maybe new file mode 100755 index 0000000..4872cb6 --- /dev/null +++ b/bin/mu-index-emacs-maybe @@ -0,0 +1,12 @@ +#! /bin/sh + +## indexes mu depending on whether emacs mu4e is running + +## assume the mu server is only started by mu4e +if pgrep -fx '/usr/bin/mu server' > /dev/null; then + echo indexing mu through emacs + emacsclient -e '(mu4e-update-index)' > /dev/null +else + echo indexing mu natively + mu index +fi