Created
January 3, 2015 12:27
-
-
Save dansimau/1fed917390f5a563baf2 to your computer and use it in GitHub Desktop.
Undo a Mac theme stuck in dark mode due to https://github.com/samturner/lights-out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Foundation import CFPreferencesSetValue | |
from Foundation import CFNotificationCenterPostNotification | |
from Foundation import CFNotificationCenterGetDistributedCenter | |
from Foundation import kCFPreferencesAnyApplication | |
from Foundation import kCFPreferencesCurrentUser | |
from Foundation import kCFPreferencesCurrentHost | |
# Remove offending preference | |
CFPreferencesSetValue('AppleInterfaceStyle', None, kCFPreferencesAnyApplication, | |
kCFPreferencesCurrentUser, kCFPreferencesCurrentHost) | |
# Trigger UI to be updated | |
CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), | |
'AppleInterfaceThemeChangedNotification', | |
None, None, True); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment