An open API service indexing awesome lists of open source software.

https://github.com/greg-peters/native-screen-js

Build compelling NodeJS applications that integrate natively with multi-monitor support.
https://github.com/greg-peters/native-screen-js

display electron electronjs monitor native nodejs screen

Last synced: 4 months ago
JSON representation

Build compelling NodeJS applications that integrate natively with multi-monitor support.

Awesome Lists containing this project

README

          

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+ (New* Main display only)

## 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
}
]
}
```