Config: delay theme loading until frame creation for daemon mode

This commit is contained in:
trogloxene
2026-04-02 06:35:00 +08:00
parent ac82a344c9
commit 9ecad315b5
3 changed files with 11 additions and 2 deletions

View File

@@ -21,4 +21,6 @@
;; 之后新建的窗口也默认最大化
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(setq frame-background-mode 'dark)
;;; early-init.el ends here

View File

@@ -156,6 +156,7 @@
(when *is-windows*
(with-eval-after-load 'org
(setq org-agenda-files '("d:/emacs/hugo/this-is-my-blog/all-blog.org"
"d:/emacs/my-org-daily/"
"d:/emacs/my-org-daily/"))))
(when *is-mac*
(with-eval-after-load 'org

View File

@@ -44,13 +44,19 @@
;; 安装solarized dark
(use-package solarized-theme)
(load-theme 'my-base16-dark t)
;; 把主题加载延迟到frame创建之后防止daemon模式下宏不能正常展开
(if (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame)
(with-selected-frame frame
(load-theme 'my-base16-dark t))))
(load-theme 'my-base16-dark t))
;; 很多主题
(use-package doom-themes)
(use-package color-theme-modern)
(use-package naysayer-theme)
(use-package base16-theme)
;; 安装smart-mode-line
(use-package smart-mode-line