TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Switch macOS Dark Mode in One Click

1 点作者 ariestiyansyah大约 6 年前

1 comment

latexr大约 6 年前
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>