Created
April 9, 2019 12:50
-
-
Save danielpunkass/b1cc0d9bcfa8d02ed7b5267e72b6b687 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
-- Line up a Python script for dynamically loading the private framework | |
-- and invoking the required private methods to get current grayscale mode | |
-- and set it to the opposite value. | |
set toggleGrayScript to "python -c 'from ctypes import cdll | |
lib = cdll.LoadLibrary(\"/System/Library/PrivateFrameworks/UniversalAccess.framework/UniversalAccess\") | |
lib.UAGrayscaleSetEnabled(lib.UAGrayscaleIsEnabled() == 0) | |
'" | |
do shell script toggleGrayScript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment