Fix theme not loading in daemon sessions #1397
This commit is contained in:
parent
17e337a434
commit
e088a21335
1 changed files with 7 additions and 5 deletions
|
@ -479,11 +479,12 @@ Fonts are specified by `doom-font', `doom-variable-pitch-font',
|
||||||
(font-get (caddr e) :family))
|
(font-get (caddr e) :family))
|
||||||
(signal 'doom-error e)))))
|
(signal 'doom-error e)))))
|
||||||
|
|
||||||
(defun doom|init-theme ()
|
(defun doom|init-theme (&optional frame)
|
||||||
"Load the theme specified by `doom-theme'."
|
"Load the theme specified by `doom-theme' in FRAME."
|
||||||
(when (and doom-theme (not (memq doom-theme custom-enabled-themes)))
|
(when (and doom-theme (not (memq doom-theme custom-enabled-themes)))
|
||||||
(let ((doom--prefer-theme-elc t))
|
(with-selected-frame (or frame (selected-frame))
|
||||||
(load-theme doom-theme t))))
|
(let ((doom--prefer-theme-elc t))
|
||||||
|
(load-theme doom-theme t)))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -508,7 +509,8 @@ Fonts are specified by `doom-font', `doom-variable-pitch-font',
|
||||||
:around #'doom*run-switch-buffer-hooks))
|
:around #'doom*run-switch-buffer-hooks))
|
||||||
|
|
||||||
;; Apply `doom-theme'
|
;; Apply `doom-theme'
|
||||||
(unless (daemonp)
|
(if (daemonp)
|
||||||
|
(add-hook 'after-make-frame-functions #'doom|init-theme)
|
||||||
(add-hook 'doom-init-ui-hook #'doom|init-theme))
|
(add-hook 'doom-init-ui-hook #'doom|init-theme))
|
||||||
;; Apply `doom-font' et co
|
;; Apply `doom-font' et co
|
||||||
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
|
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue