added theme-changer

This commit is contained in:
minhtrannhat 2021-10-03 13:48:02 -04:00
parent 5f26d7b804
commit 11c7625651
No known key found for this signature in database
GPG Key ID: 894C6A5801E01CA9
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)

View File

@ -4,6 +4,8 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("1704976a1797342a1b4ea7a75bdbb3be1569f4619134341bd5a4c1cfb16abad4" "d268b67e0935b9ebc427cad88ded41e875abfcc27abd409726a92e55459e0d01" default))
'(git-gutter:update-interval 1)
'(warning-suppress-log-types '((iedit) (iedit) (iedit) (iedit) (iedit) (iedit) (iedit)))
'(warning-suppress-types