screensaver-win
v1.2.1
Published
Trigger a callback when user has not interacted with computer for a period of time, then wait for any interaction
Downloads
15
Readme
Screensaver (for nodejs)
Trigger a callback when user has not interacted with computer for a period of time, then wait for any interaction. Rely on MS Windows GetLastInputTime (through [node winapi] (https://www.npmjs.com/package/winapi) )
API
var screensaver = require('screensaver-win');
// start a screensaver after 10s on inactity
( function stuff(){
screensaver(10, function(){
console.log("Screensaver start");
}, function() {
console.log("Screensaver end");
stuff(); //do it again !
})
})();
Credits
Keywords / shout box
screensaver, windows api, GetLastInputInfo, activity monitor, inactivity trigger, idle timer