Why not both? 根据环境和眼睛的实际需求,动态进行调整~
这是我现在的配置,一键切换亮暗主题,代码比较烂,抛砖引玉一下~
(defvar *my-dark-theme* 'dracula)
(defvar *my-light-theme* 'spacemacs-light)
(defvar *current-variant* 'light)
(load-theme 'spacemacs-light t)
(global-set-key (kbd "<f8>") #'switch-theme-variant)
(defun switch-theme-variant ()
(interactive)
(cond ((eq *current-variant* 'light)
(disable-theme *my-light-theme*)
(load-theme *my-dark-theme*)
(setq *current-variant* 'dark))
((eq *current-variant* 'dark)
(disable-theme *my-dark-theme*)
(load-theme *my-light-theme*)
(setq *current-variant* 'light))
(t (error "unknown variant"))))