Created
December 24, 2022 12:08
-
-
Save d3dave/a36f6c62f3824c3f6c2c118f7866748e to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
import time | |
import Quartz | |
def get_displays(): | |
err, activeDisplays, _ = Quartz.CGGetActiveDisplayList(6, None, None); | |
if err != Quartz.kCGErrorSuccess: | |
raise Exception(err) | |
return activeDisplays | |
def main(): | |
for display in get_displays(): | |
err = Quartz.CGSetDisplayTransferByFormula( | |
display, | |
0,1,1, # red | |
0,0.85,1, # green | |
0,0.7,1, # blue | |
) | |
if err != Quartz.kCGErrorSuccess: | |
raise Exception(err) | |
time.sleep(60) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment