Skip to content

Instantly share code, notes, and snippets.

@JRHeaton
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save JRHeaton/4105776dc2bd6ba77921 to your computer and use it in GitHub Desktop.

Select an option

Save JRHeaton/4105776dc2bd6ba77921 to your computer and use it in GitHub Desktop.
set yosemite dark mode programatically
void setOSXThemeDark(BOOL dark) {
CFPreferencesSetAppValue(CFSTR("AppleInterfaceStyle"), !dark ? nil : CFSTR("Dark"), kCFPreferencesAnyApplication);
CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), CFSTR("AppleInterfaceThemeChangedNotification"), nil, nil, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment