-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adjust frame-background-mode
automatically
#56
feat: adjust frame-background-mode
automatically
#56
Conversation
So themes that support the `background` face spec characteristic work with Auto-Dark. Fixes LionyxML#55.
I just realized that the file got autoformatted. Let me know if that’s an issue and I can revert those bits. |
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 ```elisp (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 LionyxML#56, because it doesn’t make sense to use `custom-enabled-themes` with Auto-Dark unless it updates `frame-background-mode`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool! Thanks @sellout!
This really makes auto-dark more robust when dealing with these sort of themes.
I see no reason why not add your changes. If you could please just check the review notes, that would be nice.
- undo unrelated auto-formatting - use ASCII for docstring quotes - minor phrasing adjustments in docstring
Thanks for the quick review and encouragement. I have hopefully addressed everything. I don’t know how I overlooked Auto-Dark for so long. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you efforts @sellout!
I am approving this one, It is already a nice addition to our package. :)
frame-background-mode
automaticallyframe-background-mode
automatically
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 ```elisp (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 LionyxML#56, because it doesn’t make sense to use `custom-enabled-themes` with Auto-Dark unless it updates `frame-background-mode`.
* Support multiple themes 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 ```elisp (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 #56, because it doesn’t make sense to use `custom-enabled-themes` with Auto-Dark unless it updates `frame-background-mode`. * Update the README to match these changes * Update the version to 0.13 * Improve variable documentation
So themes that support the
background
face spec characteristic work with Auto-Dark.Fixes #55.