Commit 505cd1ebb9f9
Changed files (1)
lisp
lisp/setup-style.el
@@ -188,6 +188,26 @@
(use-package hide-mode-line-mode
:commands hide-mode-line-mode)
+(defun set-light-theme ()
+ "Set the light theme with some customization if needed."
+ (interactive)
+ (load-theme 'doom-one-light t))
+
+(defun set-dark-theme ()
+ "Set the dark theme with some customization if needed."
+ (interactive)
+ (load-theme 'doom-one t))
+
+(defun theme-switcher ()
+ (interactive)
+ (let ((current-hour (string-to-number (format-time-string "%H"))))
+ (if (and (> current-hour 6) (< current-hour 20))
+ (set-light-theme)
+ (set-dark-theme))))
+
+;; Run at every 3600 seconds, after 0s delay
+(run-with-timer 0 3600 'theme-switcher)
+
(provide 'setup-style)
;; Local Variables: