mac dark模式
One of the best professional decisions I ever made was switching to a dark text editor theme. I suffered from horrible headaches for years, partially caused by late night coding sessions with blindingly bright computer screens. Recently Apple implemented a dark OS theme which helps my eyes, and thinking in a command line state of mind, I was wondering if there was a way to change dark or light mode via command line...and I found out how!
我做出的最好的专业决定之一就是切换到深色文本编辑器主题。 多年以来,我一直在经历着令人头疼的头痛,部分原因是由于深夜的编码会议以及令人眼花bright乱的计算机屏幕。 最近,Apple实施了一个黑暗的OS主题,该主题可帮助我的眼睛,并以命令行的状态进行思考,我想知道是否存在通过命令行更改黑暗或明亮模式的方法……我发现了!
Switching between light and dark mode via command line is done via a boolean flag:
通过布尔值标志通过命令行在亮和暗模式之间切换:
sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true
The good news is that switching between color preferences can be done with one command; the bad news is that you need to restart your machine for the new theme to take effect.
好消息是,可以使用一个命令在颜色首选项之间进行切换。 坏消息是您需要重新启动计算机才能使新主题生效。
For years I switched to dark themes on iPhone apps and text editors; I'm so thankful that Apple has afforded us this feature on laptops and desktops. Your eyes are important -- protect them!
多年以来,我一直在iPhone应用程序和文本编辑器上使用深色主题。 非常感谢Apple在笔记本电脑和台式机上为我们提供了此功能。 您的眼睛很重要-保护它们!
翻译自:
mac dark模式