diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2023-02-20 14:39:31 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2023-02-20 14:39:31 +0100 |
commit | 2faf4690af0da8aa218dcdd2c1acfd1aa76b0c47 (patch) | |
tree | 5164cf28b5bb478506209dd38fe3faa0e49a591b | |
parent | b7530a22f497346a64f1ea9a407579470606da85 (diff) |
feat: Rename theme finder helper
-rw-r--r-- | tailor.lisp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tailor.lisp b/tailor.lisp index 30b9564..2782f7a 100644 --- a/tailor.lisp +++ b/tailor.lisp @@ -206,7 +206,7 @@ should be activated.") (when (consp main) (setf main (cons (find-theme (car main)) (find-theme (cdr main)))))))) -(defun find-theme-variant (mode &key dark) +(defun find-theme (mode &key dark) "Find the first light `user-theme' in MODE. If DARK, find the first dark `user-theme'." (if dark @@ -217,14 +217,10 @@ If DARK, find the first dark `user-theme'." (with-slots (main themes auto-p) mode (let ((light-theme (or (when (consp main) (car main)) - (find-theme-variant mode))) + (find-theme mode))) (dark-theme (or (when (consp main) (cdr main)) - (find-theme-variant mode :dark t))) - (light-theme-threshold - (local-time:timestamp+ (today) (light-theme-threshold mode) :sec)) - (dark-theme-threshold - (local-time:timestamp+ (today) (dark-theme-threshold mode) :sec))) + (find-theme mode :dark t)))) (unless (or (not themes) (find (theme *browser*) themes :test #'equal) *current-theme*) |