TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Switch macOS Dark Mode in One Click

1 pointsby ariestiyansyahabout 6 years ago

1 comment

latexrabout 6 years ago
If you want to do the same from the command line, AppleScript makes it straightforward to do from your shell in a single line:<p><pre><code> osascript -e &#x27;tell application &quot;System Events&quot; to tell appearance preferences to get dark mode&#x27; # Get current mode osascript -e &#x27;tell application &quot;System Events&quot; to tell appearance preferences to set dark mode to true&#x27; # Set dark mode osascript -e &#x27;tell application &quot;System Events&quot; to tell appearance preferences to set dark mode to false&#x27; # Set light mode</code></pre>