https://github.com/agentcooper/node-osx-quartz
Query Quartz (Core Graphics) information on OS X
https://github.com/agentcooper/node-osx-quartz
osx quartz
Last synced: 10 months ago
JSON representation
Query Quartz (Core Graphics) information on OS X
- Host: GitHub
- URL: https://github.com/agentcooper/node-osx-quartz
- Owner: agentcooper
- Created: 2016-12-30T17:12:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-30T17:13:55.000Z (over 9 years ago)
- Last Synced: 2025-08-14T00:03:57.663Z (10 months ago)
- Topics: osx, quartz
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### osx-quartz
`npm install osx-quartz --save`
Apple Core Graphics framework provides some useful OS X information through [CGSessionCopyCurrentDictionary](https://developer.apple.com/reference/coregraphics/1454780-cgsessioncopycurrentdictionary) call.
#### Example
```js
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
```