https://github.com/kfatehi/apple-system-listener
Reports the following events: sleep, wake, shutdown, boot, power settings change, user active, and user idle.
https://github.com/kfatehi/apple-system-listener
Last synced: 4 months ago
JSON representation
Reports the following events: sleep, wake, shutdown, boot, power settings change, user active, and user idle.
- Host: GitHub
- URL: https://github.com/kfatehi/apple-system-listener
- Owner: kfatehi
- Created: 2016-09-02T22:03:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-02T19:40:16.000Z (almost 9 years ago)
- Last Synced: 2025-02-24T12:13:48.526Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# apple system listener
Event emitter that, through a pair of subprocesses, reports sleep, wake, shutdown, boot, power settings change, user active, and user idle.
The constructor takes an integer which is how many lines to go back when running `syslog -w [lines-back]` under the hood.
## example
```javascript
var AppleSysListener = require('apple-system-listener');AppleSysListener(9000).on('event', function(event) {
console.log(event);
});
```