added theme-changer

This commit is contained in:
minhtrannhat
2021-10-03 13:48:02 -04:00
parent 5f26d7b804
commit 11c7625651
2 changed files with 36 additions and 3 deletions

View File

@@ -24,6 +24,20 @@
(setq doom-theme 'doom-nord)
(defun synchronize-theme ()
(let* ((light-theme 'doom-nord-light)
(dark-theme 'doom-nord)
(start-time-light-theme 6)
(end-time-light-theme 18)
(hour (string-to-number (substring (current-time-string) 11 13)))
(next-theme (if (member hour (number-sequence start-time-light-theme end-time-light-theme))
light-theme dark-theme)))
(when (not (equal doom-theme next-theme))
(setq doom-theme next-theme)
(load-theme next-theme))))
(run-with-timer 0 900 'synchronize-theme)
(with-eval-after-load 'doom-themes
(doom-themes-treemacs-config))
(setq doom-themes-treemacs-theme "doom-colors")
@@ -76,9 +90,6 @@
(add-hook! org-mode :append
#'visual-line-mode)
;; tabs tabs
(setq centaur-tabs-cycle-scope 'tabs)
;; fish fish
(setq vterm-shell 'fish)
@@ -100,3 +111,23 @@
(setq-default history-length 1000)
(setq-default prescient-history-length 1000)
;; Whether display the icon for `major-mode'. It respects `doom-modeline-icon'.
(setq doom-modeline-major-mode-icon t)
;; Whether display the colorful icon for `major-mode'.
;; It respects `all-the-icons-color-icons'.
(setq doom-modeline-major-mode-color-icon t)
;; Whether display the icon for the buffer state. It respects `doom-modeline-icon'.
(setq doom-modeline-buffer-state-icon t)
;; Whether display the modification icon for the buffer.
;; It respects `doom-modeline-icon' and `doom-modeline-buffer-state-icon'.
(setq doom-modeline-buffer-modification-icon t)
;; Whether to use unicode as a fallback (instead of ASCII) when not using icons.
(setq doom-modeline-unicode-fallback nil)
;; Whether display the minor modes in the mode-line.
(setq doom-modeline-minor-modes nil)