diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-06-30 09:45:09 +0200 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-06-30 09:45:09 +0200 |
commit | c9c9e53a34ae1935ff315dfe9bab72bd2e5c800b (patch) | |
tree | b0ef7665211bddf572a55e1984bc4f367205bd12 | |
parent | d519df09b4e5f79c745573eef90f2f7a28157b56 (diff) |
feat: allow passing a tailor:user-theme object to nyxt-load-theme
-rw-r--r-- | nyxt.el | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -221,7 +221,9 @@ Optionally test if the extension's SYMBOL is bound." ;;;###autoload (defun nyxt-load-theme (theme) - "Load THEME in Nyxt." + "Load THEME in Nyxt. +THEME can be the name of one of the currently loaded `tailor:user-theme' themes +or a new quoted `tailor:user-theme' instance." (interactive (list (intern @@ -235,7 +237,9 @@ Optionally test if the extension's SYMBOL is bound." '(mapcar #'tailor::name (tailor:themes (tailor::current-tailor-mode)))))))))) (if (nyxt--extension-p "nx-tailor" "load-theme") - (nyxt-run `(nx-tailor:load-theme ',theme)) + (nyxt-run (if (listp theme) + `(nx-tailor:load-theme ,theme) + `(nx-tailor:load-theme ',theme))) (error "You need the nx-tailor extension to change Nyxt theme"))) ;;;###autoload |