tommoor / node-afk

Away from keyboard!

Home Page:https://www.npmjs.org/package/afk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-afk

Provides seconds since the user was last active

Install

npm install afk

Example

var afk = require('afk');

var seconds = 10;

var listenerId = afk.addListener(seconds, function(e) {
	console.log(e)
	afk.removeListener(e.id);
})

Notes

Linux support requires xprintidle otherwise returns 0

About

Away from keyboard!

https://www.npmjs.org/package/afk


Languages

Language:JavaScript 94.6%Language:Shell 5.4%