VS Code recently added the ability to switch themes when macOS's dark mode changes. Presumably they use the Electron API, which internally uses the Objective-C API of subscribing to the
AppleInterfaceThemeChangedNotification event in
It would be nice if Emacs had this same ability. The pseudo-code would be:
(add-event 'os-dark-mode-changed (lambda (on) (set-theme (if on some-dark-theme some-light-theme))))
(In VS Code, the dark and light themes are configurable.)
Does Emacs have the ability to do something similar?