Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@131/screensaver

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@131/screensaver

[![Version](https://img.shields.io/npm/v/@131/screensaver.svg)](https://www.npmjs.com/package/@131/screensaver) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)

  • 1.3.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Screensaver API (for nodejs)

Version License

Coverage Status

Build Status Available platform Available platform

Motivation

A simple screensaver API that enable you to wait for a configured idle time. And stop over user interaction. Detecting user interaction (mostly a system wide API call, is delegated to an external closure). See below for details

API

const ScreenSaver = require('@131/screensaver');

const {getIdleTime} = os.platform() == 'linux' ? require('screensaver-trigger/idle_time_linux') : require('winapi');


const timeout = 60 * 1000; //1min

const screenSaver = new ScreenSaver(timeout, getIdleTime);

screenSaver.on('open', () => {
  console.log('screen saver start');
})

screenSaver.on('close', () => {
  console.log('screen saver close');
})


Credits

  • 131
  • idjem

FAQs

Package last updated on 24 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc