1.0.0 • Published 7 years ago

idle_user v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Idle User

This package exports a promise that will return the number of seconds since mouse/keyboard was last used.

For now only macOS is supported, but if you know how to get this information on other systems feel free to add a pull request or open an issue.

Example

const idleUser = require('idle-user');

idleUser().then(secondsSinceActivity => {
  console.log(`No activity for ${secondsSinceActivity} seconds`);
});