From 2ef6316ae717c53071ceecc6e055d890ae0a0bfb Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 5 Jan 2025 16:52:44 +0000 Subject: darwin/emacs: Tweak when the server is started Only start the server if it is not running already and the current display is a graphical display. --- dotfiles-darwin/emacs/init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'dotfiles-darwin') diff --git a/dotfiles-darwin/emacs/init.el b/dotfiles-darwin/emacs/init.el index dc78758..b0ef91a 100644 --- a/dotfiles-darwin/emacs/init.el +++ b/dotfiles-darwin/emacs/init.el @@ -15,6 +15,16 @@ :custom (org-roam-directory "~/Documents/ZK/")) +;; Server + +(use-package server + :config + (defun my/server-start () + (when (and (display-graphic-p) (not (server-running-p))) + (server-start))) + :hook (after-init . my/server-start)) + + ;; Theme Management (when (or window-system (daemonp)) -- cgit v1.2.3-70-g09d2