es

electron-screen

Small Module that returns an array with all the monitors connected to the pc with their resolution and position.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

5

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Electron Screen

js-standard-style

Small Module that returns an array with all the monitors connected to the pc with their resolution and position.
The standard API of electron already do this, but under Windows the screen api suffers lot of issues.

Works only under Windows OS!
If you want to manage screens with other OS have a look here.

Usage

Download and install electron-screen through npm, then require it:

const screen = require('electron-screen')

console.log(screen())

Under Windows electron-screen returns the following array of objects, where every object is a different screen :

[{
  bounds: {
    x: Number,
    y: Number,
    width: Number,
    height: Number
  }
}]

Build

  • For testing:
$ npm build .
  • For use the module inside Electron:
    Follow this instructions.

TODO

  • Wrap Electron's native screen API and use electron-screen only under Windows.
  • Add testing

Contributing

If you feel you can help in any way, be it with examples, extra testing, or new features please open a pull request or open an issue.

I would make a special thanks to @Corralx for helping me to improving the code.

The code follows the Standard code style.
js-standard-style


License

The code is released under the MIT license.

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial