osx-quartz
v1.0.0
Published
Query Quartz (Core Graphics) information on OS X
Downloads
5
Maintainers
Readme
osx-quartz
npm install osx-quartz --save
Apple Core Graphics framework provides some useful OS X information through CGSessionCopyCurrentDictionary call.
Example
const quartz = require('osx-quartz');
console.log(quartz.CGSessionCopyCurrentDictionary());
/*
{ kCGSSessionAuditIDKey: '100005',
kCGSSessionGroupIDKey: '20',
kCGSSessionLoginwindowSafeLogin: '0',
kCGSSessionOnConsoleKey: '1',
kCGSSessionSystemSafeBoot: '0',
kCGSSessionUserIDKey: '503',
kCGSSessionUserNameKey: 'john-doe',
kCGSessionLoginDoneKey: '1',
kCGSessionLongUserNameKey: 'JohnDoe',
kSCSecuritySessionID: '100005' }
*/
console.log(quartz.isScreenLocked()); // returns boolean