From b7b16b8b7fc109802a5065a0193228a3a095681a Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Tue, 5 May 2026 09:23:14 -0500 Subject: Added hook to request macos permissions for light/dark mode event. --- init.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.el b/init.el index 3a79a9f..9f128f6 100644 --- a/init.el +++ b/init.el @@ -342,6 +342,12 @@ (require 'auto-dark) (setq auto-dark-allow-osascript t auto-dark-themes '((solarized-dark) (solarized-light))) +;; Trigger the macOS Automation permission prompt for System Events when +;; launched from Spotlight. ns-do-applescript fails silently without the +;; prompt, but shelling to osascript surfaces TCC. +(when (eq system-type 'darwin) + (call-process "osascript" nil nil nil + "-e" "tell application \"System Events\" to tell appearance preferences to return dark mode")) (auto-dark-mode 1) -- cgit v1.2.3