I\'ve managed to get the display to sleep immediately with
pmset displaysleepnow
in terminal, however for waking the display I\'ve only found>
Got it working with:
IOPMAssertionID assertionID; IOPMAssertionDeclareUserActivity(CFSTR(""), kIOPMUserActiveLocal, &assertionID);