Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't update $DARKMODE when appearance is changed with Shortcuts #10

Open
gregorias opened this issue May 16, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@gregorias
Copy link

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:

image

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

@gregorias gregorias added the bug Something isn't working label May 16, 2023
@huyz
Copy link

huyz commented Jul 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants