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

[Windows] Theme defaults to "wombat" #51

Closed viktordoronin closed 4 months ago

viktordoronin commented 5 months ago

Upon enabling the package, Emacs' theme gets set to "wombat" regardless what I actually have set in the init file. Commenting out lines that enable auto-dark-mode fixes the issue. So far I load-theme my theme after enabling the package but then both my theme and "wombat" end up being enabled, so I have to disable-theme "wombat" too.

My init file(just the relevant bits):

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes '(tango-dark)))

(auto-dark-mode t)
(setq auto-dark-polling-interval-seconds 2)
(setq auto-dark-dark-theme 'tango-dark)
(setq auto-dark-light-theme 'tango)
(load-theme 'tango-dark t) ;; reenable the theme I actually want
(disable-theme 'wombat) ;; disable this

GNU Emacs 29.2 (build 2, x86_64-w64-mingw32) of 2024-02-01(insert (emacs-version)) OS Name: Microsoft Windows 11 Education OS Version: 10.0.22621 N/A Build 22621

LionyxML commented 5 months ago

Hello there @viktordoronin! Thanks for reaching out!

Could we try something a little cleaner for our tests?

I just opened Emacs with only auto-dark installed on Windows 11.

I opened my config via C-x f and path ~/.emacs.

And added this:

(custom-set-variables
 '(package-selected-packages '(auto-dark)))
(custom-set-faces
 )
(setq auto-dark-polling-interval-seconds 2)
(setq auto-dark-dark-theme 'tango-dark)
(setq auto-dark-light-theme 'tango)
(auto-dark-mode t)

I usually enable auto-dark-mode after setting the desired values. See if it makes any difference for you please.

Starting Emacs with Dark mode or switching it on Windows did work:

image

image

I know from experience Emacs can get a bit sentimental with theme selection, If you could please use my "minimal setup" above, run M-x customize-themes unselect all themes, unselect "Select more than one theme at a time", save the settings and restart Emacs and let me know what happens, that would be great :)

viktordoronin commented 4 months ago

Sorry for the late reply - yeah this seemed to work. Kind of weird since it worked on Linux exactly how I wrote it.

LionyxML commented 4 months ago

No problem! Glad to hear it worked!