#monitor #display #windows

monitor-control-win

Control monitors on Windows (WIP, currently read-only)

2 releases

0.1.1 Apr 11, 2021
0.1.0 Apr 10, 2021

#197 in Windows APIs

MIT license

15KB
296 lines

This library aims to handle getting information about and communicate with monitors on Windows. Currently only getting information is supported.

For the equivalent on Linux see xrandr-rs

Reliability

In short, this is an "It Works on my Machine" library. I've tested this library on one device, a Surface Book 2 running Windows 10.

Based on my dependencies' documentation, listing all monitors probably works at least as far back as Windows 8.1 and possibly as far back as Windows 7.

The approach used in this library for getting EDIDs is based off of old forum posts and StackOverflow answers and relies on undocumented registry keys. Some people on the internet report it works for many displays.

Getting monitors intersecting a window involves parsing an opaque ID with a Regex. I would be surprised if it works reliably.

Dependencies

~131MB
~2M SLoC