Socket
Socket
Sign inDemoInstall

native-screen-js

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    native-screen-js

A native screen api for getting multi-monitor information. Specifically designed for calculating coordinates for screen captures


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

This project is designed to be a cross platform NodeJS display solution that supports multiple displays.

  • Goal 1: Develop cross platform display api to query multiple physical displays
  • Goal 2: Detect which display currently has focus
  • Goal 3: Screen capture support for active display

Supported Platforms

  • Mac OSX 10.5+
  • Windows 2000 or later
  • Linux 2.7+ (Coming Soon)

Requirements

Install Yarn
npm install yarn -g

Compile
yarn

Run Demo
node test.js

Usage

const screen = require('native-screen-js');
console.log(screen.getDisplayInfo());

Output

{
  "displayCount": 1,
  "screens": [
    {
      "modelNumber": 43298, <--- OSX Only
      "isBuiltIn": 1,
      "isMainDisplay": 1,
      "width": 1440,
      "height": 900,
      "x": 0,  <--- Top left corner of display in virtual space
      "y": 0,  <--- Top left corner of display in virtual space
      "rotation": 0 <--- OSX Only
    }
  ]
}

Keywords

FAQs

Last updated on 18 May 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc