aboutsummaryrefslogtreecommitdiff
path: root/macos/Applications/Emacs.app
diff options
context:
space:
mode:
Diffstat (limited to 'macos/Applications/Emacs.app')
-rw-r--r--macos/Applications/Emacs.app/Contents/MacOS/Emacs.org6
1 files changed, 4 insertions, 2 deletions
diff --git a/macos/Applications/Emacs.app/Contents/MacOS/Emacs.org b/macos/Applications/Emacs.app/Contents/MacOS/Emacs.org
index c46a713..03c5152 100644
--- a/macos/Applications/Emacs.app/Contents/MacOS/Emacs.org
+++ b/macos/Applications/Emacs.app/Contents/MacOS/Emacs.org
@@ -2,6 +2,8 @@
#+begin_src sh :tangle ~/Applications/Emacs.app/Contents/MacOS/Emacs :mkdirp yes :tangle-mode o755
#!/bin/sh
- /opt/homebrew/bin/emacsclient -c &> /dev/null &
- disown
+ if ! ps -e | grep -q '[E]macs --bg-daemon'; then
+ /opt/homebrew/bin/emacs --daemon
+ fi
+ /opt/homebrew/bin/emacsclient -c &> /dev/null
#+end_src