LionyxML / auto-dark-emacs

Auto-Dark-Emacs is an auto changer between 2 themes, dark/light, following MacOS, Linux or Windows Dark Mode settings
GNU General Public License v2.0
140 stars 34 forks source link

Support multiple themes #57

Open sellout opened 1 month ago

sellout commented 1 month ago

Like custom-enabled-themes, Auto-Dark now allows multiple themes to be set for either each mode. It also now defaults to using custom-enabled-themes if there is nothing explicitly set for Auto-Dark.

Because (dis|en)abling themes modifies custom-enabled-themes, you either have to set both the dark-themes and light-themes or neither, so there is a single new variable auto-dark-themes that manages both lists.

If neither the new variable nor custom-enabled-themes is set, then it falls back to the pre-existing single theme behavior, which is now marked obsolete.

With this change[^1] I can now configure my themes like

(use-package emacs
  :custom (custom-enabled-themes '(bringhurst solarized inheritance)))

(use-package auto-dark
  :init (auto-dark-mode))

(since my themes all support dark/light modes).

[^1]: This change is built on https://github.com/LionyxML/auto-dark-emacs/pull/56, because it doesn’t make sense to use custom-enabled-themes with Auto-Dark unless it updates frame-background-mode.

sellout commented 1 month ago

Thanks again. Awesome work!

Thanks, really appreciate you being so on top of these.

I prefer to see your first commit merged first, just to keep things one step at the time.

Yes, agreed. I’ll rebase this on master once #56 is merged, since it looks like it’s moving quickly.

LionyxML commented 1 month ago

Thanks @sellout! Awesome work! #56 is already merged.

sellout commented 1 month ago

Ok, this has been rebased. I updated the version and also improved some of the documentation of the affected variables. (Even though I rebased, I made the new changes in fresh commits so you can review them without having to re-review the rest of the work.)