Change themes
This commit is contained in:
parent
9517df65e1
commit
a178f79eba
1 changed files with 4 additions and 4 deletions
8
init.el
8
init.el
|
@ -143,16 +143,16 @@
|
||||||
:straight t
|
:straight t
|
||||||
:init
|
:init
|
||||||
(setq ef-themes-mixed-fonts t)
|
(setq ef-themes-mixed-fonts t)
|
||||||
(setq ef-themes-to-toggle '(ef-day ef-night))
|
(setq ef-themes-to-toggle '(ef-light ef-dark))
|
||||||
(mapc #'disable-theme custom-enabled-themes)
|
(mapc #'disable-theme custom-enabled-themes)
|
||||||
(load-theme 'ef-night :no-confirm)
|
(load-theme 'ef-dark :no-confirm)
|
||||||
(when (eq window-system 'ns)
|
(when (eq window-system 'ns)
|
||||||
(defun dl/themes-toggle-with-system (appearance)
|
(defun dl/themes-toggle-with-system (appearance)
|
||||||
"Load dark or light theme depending on system appearance on macOS."
|
"Load dark or light theme depending on system appearance on macOS."
|
||||||
(mapc #'disable-theme custom-enabled-themes)
|
(mapc #'disable-theme custom-enabled-themes)
|
||||||
(pcase appearance
|
(pcase appearance
|
||||||
('light (load-theme 'ef-day :no-confirm))
|
('light (load-theme 'ef-light :no-confirm))
|
||||||
('dark (load-theme 'ef-night :no-confirm))))
|
('dark (load-theme 'ef-dark :no-confirm))))
|
||||||
(add-hook 'ns-system-appearance-change-functions #'dl/themes-toggle-with-system))
|
(add-hook 'ns-system-appearance-change-functions #'dl/themes-toggle-with-system))
|
||||||
:bind ("<f12>" . ef-themes-toggle))
|
:bind ("<f12>" . ef-themes-toggle))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue