screensaver-win

1.2.1 • Public • Published

Screensaver (for nodejs)

Version License

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 )

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

Package Sidebar

Install

npm i screensaver-win

Weekly Downloads

2

Version

1.2.1

License

ISC

Unpacked Size

2.54 kB

Total Files

5

Last publish

Collaborators

  • 131
  • idjem