ADD mu sync script

This commit is contained in:
Nathan Dwarshuis 2024-01-07 10:03:25 -05:00
parent a1010506d8
commit acef51b7d6
1 changed files with 12 additions and 0 deletions

12
bin/mu-index-emacs-maybe Executable file
View File

@ -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