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.
- Host: GitHub
- URL: https://github.com/greg-peters/native-screen-js
- Owner: greg-peters
- Created: 2021-02-08T14:08:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T20:35:20.000Z (over 2 years ago)
- Last Synced: 2025-02-17T03:13:14.916Z (over 1 year ago)
- Topics: display, electron, electronjs, monitor, native, nodejs, screen
- Language: C
- Homepage:
- Size: 27.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
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
}
]
}
```