{"id":18544772,"url":"https://github.com/131/node-screensaver","last_synced_at":"2025-05-15T05:34:18.344Z","repository":{"id":73455565,"uuid":"473201507","full_name":"131/node-screensaver","owner":"131","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-24T11:51:01.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T09:16:46.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/131.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-23T13:30:53.000Z","updated_at":"2022-03-23T13:31:28.000Z","dependencies_parsed_at":"2023-02-28T13:02:04.607Z","dependency_job_id":null,"html_url":"https://github.com/131/node-screensaver","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fnode-screensaver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fnode-screensaver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fnode-screensaver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fnode-screensaver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/node-screensaver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254282994,"owners_count":22045131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:17:34.511Z","updated_at":"2025-05-15T05:34:18.322Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Screensaver API (for nodejs)\n\n[![Version](https://img.shields.io/npm/v/@131/screensaver.svg)](https://www.npmjs.com/package/@131/screensaver)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\n[![Coverage Status](https://coveralls.io/repos/github/131/node-screensaver/badge.svg?branch=master)](https://coveralls.io/github/131/node-screensaver?branch=master)\n\n[![Build Status](https://github.com/131/ubk/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/131/ubk/actions/workflows/test.yml)\n![Available platform](https://img.shields.io/badge/platform-win32-blue.svg) ![Available platform](https://img.shields.io/badge/platform-linux-blue.svg)\n\n# Motivation\nA simple screensaver API that enable you to wait for a configured idle time. And stop over user interaction.\nDetecting user interaction (mostly a system wide API call, is delegated to an external closure). See below for details\n\n\n# API\n\n```\nconst ScreenSaver = require('@131/screensaver');\n\nconst {getIdleTime} = os.platform() == 'linux' ? require('screensaver-trigger/idle_time_linux') : require('winapi');\n\n\nconst timeout = 60 * 1000; //1min\n\nconst screenSaver = new ScreenSaver(timeout, getIdleTime);\n\nscreenSaver.on('open', () =\u003e {\n  console.log('screen saver start');\n})\n\nscreenSaver.on('close', () =\u003e {\n  console.log('screen saver close');\n})\n\n\n```\n\n\n\n# Credits \n* [131](https://github.com/131)\n* [idjem](https://github.com/idjem)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fnode-screensaver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fnode-screensaver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fnode-screensaver/lists"}