From 791d50ae7ef07d1fc85d6ff9e0d63cf29d25283b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 1 Oct 2024 15:33:01 +0100 Subject: Emacs theme isn't synced to time, and is loaded after-init --- Emacs/.config/emacs/config.org | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index dd6fa25..6e56300 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -254,7 +254,8 @@ theme is in [[file:elisp/personal-light-theme.el][this file]]. #+begin_src emacs-lisp (use-package custom :defer t - :commands +oreo/switch-theme + :commands (+oreo/load-theme) + :hook (after-init-hook . +oreo/load-theme) :init (setq custom-theme-directory (concat user-emacs-directory "elisp/")) (defvar +oreo/theme-list `(personal-light personal-solarized)) @@ -281,15 +282,7 @@ theme is in [[file:elisp/personal-light-theme.el][this file]]. (setq +oreo/theme (mod (+ 1 +oreo/theme) (length +oreo/theme-list))) (+oreo/load-theme)) - (defun +oreo/sync-theme () - (let ((hour (read (format-time-string "%H")))) - (setq +oreo/theme - (if (and (>= hour 8) (< hour 15)) - 0 - 1)) - (+oreo/load-theme))) - - (run-at-time nil (* 60 60) #'+oreo/sync-theme)) + (+oreo/load-theme)) #+end_src ** Font size Adjust font sizes for my devices. -- cgit v1.2.3-13-gbd6f