Function: auto-dark--is-dark-mode-ns
auto-dark--is-dark-mode-ns is a natively compiled function defined in
auto-dark.el.
Signature
(auto-dark--is-dark-mode-ns)
Documentation
Check if dark mode is enabled using ns-do-applescript.
Source Code
;; Defined in /nix/store/fxsazwcy8jcsigjhcydkb81ip47xqcw0-emacs-packages-deps/share/emacs/site-lisp/elpa/auto-dark-20260313.2356/auto-dark.el
(defun auto-dark--is-dark-mode-ns ()
"Check if dark mode is enabled using `ns-do-applescript'."
;; FIXME: We shouldn’t need to check `fboundp' on every call, just when
;; setting the detection method.
(when (fboundp 'ns-do-applescript)
(string-equal "true" (ns-do-applescript "tell application \"System Events\"
tell appearance preferences
if (dark mode) then
return \"true\"
else
return \"false\"
end if
end tell
end tell"))))