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

Allow no theme as dark/light theme - i.e., (setq auto-dark-*-theme nil) #41

Closed luisgerhorst closed 6 months ago

luisgerhorst commented 8 months ago

A simple if clause here

https://github.com/LionyxML/auto-dark-emacs/blob/65cc6337de9030ea7cae4661389019b9443543a2/auto-dark.el#L164

would probably do it. Doom supports the same for doom-theme because the default colors are also nice:

doom-theme is a customizable variable defined in doom-ui.el.

Value
doom-solarized-dark

Original Value
nil

Set Customize

Documentation
A symbol representing the Emacs theme to load at startup.

Set to nil to load no theme at all. This variable is changed by
load-theme.
LionyxML commented 8 months ago

Hello there @luisgerhorst ! Is this related to your PR #40?

Sorry I didn't get what you mean. I am not familiar with doom emacs myself. Would you explain it to me?

luisgerhorst commented 8 months ago

Sure, no it's unrelated. This is not really related to doom, doom is just an example where this feature was implemented. Currently, there is no way to tell auto-dark-theme to use no theme as dark/light theme (i.e., unload all themes but not load any new theme). This suggests implementing this feature by allowing the theme to be set to nil. Does this make it clear?

LionyxML commented 7 months ago

Hey @luisgerhorst !

Yep, I got you.

A "no theme" option for ether dark and light modes is not currently implemented.

Maybe the better approach would be allowing the variables auto-dark-dark-theme and auto-dark-light-theme to be nil and treating them when (load-theme) is called. I'd keep the hooks working though.

LionyxML commented 6 months ago

@luisgerhorst , thanks for the suggestion. Closing this discussion.

auto-dark-mode can now use nil as a theme option.

luisgerhorst commented 6 months ago

Awesome, thank you! :)