Skip to content

Instantly share code, notes, and snippets.

@quad
Last active Jan 22, 2019
Embed
What would you like to do?
Make macOS (OSX) Greyscale from the terminal (CLI)
tgray: tgray.c
clang -g -std=c11 -Wall -framework ApplicationServices $^ -o $@
#include <ApplicationServices/ApplicationServices.h>
CG_EXTERN bool CGDisplayUsesForceToGray(void);
CG_EXTERN void CGDisplayForceToGray(bool forceToGray);
int main(int argc, const char** argv)
{
CGDisplayForceToGray(!CGDisplayUsesForceToGray());
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment