Doesn't update $DARKMODE when appearance is changed with Shortcuts
gregorias opened this issue · 1 comments
gregorias commented
TL;DR
If I change appearance using a shortcut defined in Shortcuts, the DARKMODE variable doesn't update.
To reproduce, set the shortcut like so:
Try running the app and displaying the $DARKMODE variable.
Expected behavior
$DARKMODE
variable is updated accordingly.
Observed behavior
$DARKMODE
variable is retains its previous value and ignores system changes.
Terraform Configuration
I don't know how to do this.
Terraform Version
I don't know how to do this.
Additional information
No response
huyz commented
Works for me if I use AppleScript. So this could be a workaround for you if you have your shortcut trigger an AppleScript:
tell application "System Events"
tell appearance preferences
set dark mode to not dark mode
if dark mode then
set mode to "dark"
else
set mode to "light"
end if
end tell
end tell