diff options
author | Alan Pearce | 2022-10-03 18:34:34 +0200 |
---|---|---|
committer | Alan Pearce | 2022-10-03 18:34:34 +0200 |
commit | fc451064dc7ed8237864ad186353f0eaaf1dd84e (patch) | |
tree | cdef5708aa5d9be7782be20d73427354fc929904 /user | |
parent | b40e77b6501150cbab8805447a02d4bc8eb0814f (diff) | |
download | nixfiles-fc451064dc7ed8237864ad186353f0eaaf1dd84e.tar.lz nixfiles-fc451064dc7ed8237864ad186353f0eaaf1dd84e.tar.zst nixfiles-fc451064dc7ed8237864ad186353f0eaaf1dd84e.zip |
Emacs: fix dark/light auto-switching
Diffstat (limited to 'user')
-rw-r--r-- | user/emacs/init.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index e43d1c2d..06a8c2d6 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -76,10 +76,11 @@ (dark-mode-theme 'spacemacs-dark)) (defun my/set-dark-or-light-theme () (let ((appearance (plist-get (mac-application-state) :appearance))) + (mapc #'disable-theme custom-enabled-themes) (cond ((equal appearance "NSAppearanceNameAqua") - (counsel-load-theme light-mode-theme t)) + (load-theme light-mode-theme t)) ((equal appearance "NSAppearanceNameDarkAqua") - (counsel-load-theme dark-mode-theme t))))) + (load-theme dark-mode-theme t))))) (add-hook 'mac-effective-appearance-change-hook #'my/set-dark-or-light-theme) (if (boundp 'mac-effective-appearance-change-hook) (my/set-dark-or-light-theme) @@ -253,7 +254,6 @@ _p_rev _u_pper _=_: upper/lower _r_esolve :config (setq amx-history-length 100)) (use-package counsel - :functions (counsel-load-theme) :commands (counsel-unicode-char) :general ("M-x" #'counsel-M-x)) |