Fixing macOS's Automatic Appearance Capability

August 2, 2025 at 1 PM

Recently I’ve noticed that, for reasons I can’t figure out, my installation of macOS has gotten very bad at changing my system appearance from light to dark (and vice versa) when the sun sets or rises. (No, my system time isn’t wrong. No, it isn’t a problem with my Night Shift settings, I don’t think.)

I got fed up and wrote a little Python tool that can make the changes for me using Applescript:

uv tool install "git+https://github.com/tomshafer/auto-appearance"
uvx auto-appearance --lat <latitude> --lon <longitude>

You can get the program here, on GitHub.

This doesn’t have to be a manual thing, either. I have the program set up to run every so often with launchd so I don’t have to think about it:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.tshafer.auto-appearance</string>

        <key>Program</key>
        <string>/Users/tomshafer/.local/bin/uvx</string>

        <key>ProgramArguments</key>
        <array>
            <string>/Users/tomshafer/.local/bin/uvx</string>
            <string>auto-appearance</string>
            <string>--lat=XY.ZZZZZZ</string> <!-- Use your latitude -->
            <string>--lon=UV.AAAAAA</string> <!-- Use your longitude -->
        </array>

        <key>WorkingDirectory</key>
        <string>/Users/tomshafer/tmp</string>

        <key>StandardErrorPath</key>
        <string>/Users/tomshafer/tmp/auto-appearance.stderr.log</string>

        <key>StartInterval</key>
        <integer>900</integer>

        <key>RunAtLoad</key>
        <true />

        <key>KeepAlive</key>
        <false />

        <key>ProcessType</key>
        <string>Background</string>
    </dict>
</plist>

Related Posts