displays
is a native cross-platform Node.js module for Windows, Linux / X11 and macOS / OSX for retrieving the resolution and position of all connected and active displays / monitors / screens.
See test.js
, for an example on how to retrieve all connected displays:
const displays = require("displays")();
console.log("got displays", displays);
This will output:
got displays [
Display { top: 0, left: 0, width: 1920, height: 1080 },
Display { top: 0, left: 1920, width: 800, height: 600 }
]
This is a Node.js module available through the npm registry. Install it using:
$ npm install displays
Before installing, download and install Node.js. Node.js 12 is recommended.
Written by Kristian Kraljić.
Please file any issues on Github.
This library is licensed under the MIT license.