diff --git a/core/me-builtin.el b/core/me-builtin.el index 05f98a1f..666b57fa 100644 --- a/core/me-builtin.el +++ b/core/me-builtin.el @@ -1382,6 +1382,18 @@ current line.") (window-divider-default-bottom-width 2) (window-divider-default-right-width 2)) +(use-package server + :straight (:type built-in) + :hook (server-after-make-frame . +load-theme) ; Reload theme when creating a frame on the daemon + :autoload server-running-p + :init + ;; When we start in a non-daemon Emacs, we start a server whe Emacs is idle. + (+lazy-unless! (daemonp) + (unless (server-running-p) + (let ((inhibit-message t)) + (server-start nil t) + (+info! "Started Emacs daemon in background."))))) + (use-package speedbar ; config from Crafted Emacs :straight (:type built-in) :custom diff --git a/modules/me-daemon.el b/modules/me-daemon.el index 6d7dd351..9ef5e34a 100644 --- a/modules/me-daemon.el +++ b/modules/me-daemon.el @@ -32,17 +32,6 @@ (let ((inhibit-message t)) (elfeed-update)))))) -;; When we start in a non-daemon Emacs, we start a server whe Emacs is idle. -(+lazy-unless! (daemonp) - (require 'server) ; For using `server-running-p' - (unless (server-running-p) - (let ((inhibit-message t)) - (+info! "Starting Emacs daemon in background.") - (server-start nil t)))) - -;; Reload theme when creating a frame on the daemon -(add-hook 'server-after-make-frame-hook #'+load-theme) - (provide 'me-daemon)