Closed porterjamesj closed 8 months ago
Hello @porterjamesj 😊,
Thank you for bringing this to my attention. The behavior does seem a bit unusual.
Would you be interested in submitting a pull request (PR)?
@LionyxML @porterjamesj I attached a PR that fixes it for me when I set auto-dark-allow-osascript
in my init.el:
;; Automatically adjust for light/dark modes
(use-package auto-dark
:config
(setq auto-dark-dark-theme 'modus-vivendi
auto-dark-light-theme 'modus-operandi)
(when (not window-system) (setq auto-dark-allow-osascript t))
(auto-dark-mode t)
)
Nice catch @porterjamesj , thanks @ascarter for the PR! It is now merged and will be soon available on MELPA.
Hi,
Thanks for continuing to work on this package and getting in on MELPA! I've been using my own fork for years but am now back on this one :)
I'm happily using it fine it GUI, but there appears to be a bug in Terminal on macOS. Specifically, the code for determining if Applescript should be used as the detection method is:
However, this is incorrect. When I try to use auto-dark in the terminal. this evaluates to
t
becausens-do-applescript
is bound. Then, when you try to evaluate Applescript, as auto-dark does later, you get an error:The best way I can think of to fix it would be to use
(eq window-system
ns)` instead, which for me at least (on macOS 11 and Emacs 29.1) correctly evaluates to true in GUI, false in terminal.