Created
January 15, 2019 11:50
-
-
Save darren/637771c945a44ee757e864e640b21ec3 to your computer and use it in GitHub Desktop.
switch macOS dark mode to prevent iMac image retention
This file contains hidden or 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
#!/usr/bin/env bash | |
# 1. what is image retentiion: https://support.apple.com/en-us/HT202580 | |
# 2. Put this file ~/.local/bin/ | |
# 3. then Add this to crontab | |
# */10 * * * * ~/.local/bin/switch-darkmode.sh | |
osascript -e ' | |
tell application id "com.apple.systemevents" | |
tell appearance preferences | |
if dark mode is true then | |
set dark mode to false | |
else | |
set dark mode to true | |
end if | |
end tell | |
end tell | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment