From 70ee7389a19437d66ba58af0296d0a7cd176efa2 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 27 Aug 2024 15:40:08 +0100 Subject: (Emacs/config)+timer to sync theme based on hour --- Emacs/.config/emacs/config.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b1aaf59..8f0ac21 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -278,7 +278,14 @@ eyes too much. (setq +oreo/theme (mod (+ 1 +oreo/theme) (length +oreo/theme-list))) (+oreo/load-theme)) - (+oreo/load-theme)) + (defun +oreo/sync-theme () + (let ((hour (read (format-time-string "%H")))) + (setq +oreo/theme + (if (or (< hour 8) (> hour 18)) + 1 + 0)) + (+oreo/load-theme))) + (run-at-time nil (* 60 60) #'+oreo/sync-theme)) #+end_src ** Font size Adjust font sizes for my devices. -- cgit v1.2.3-13-gbd6f