rr- / screeninfo

Fetch location and size of physical screens.
Other
208 stars 36 forks source link

`is_primary` boolean for Monitor objects #52

Closed cedric-uden closed 3 years ago

cedric-uden commented 3 years ago

Hello everyone,

I am interested in using this code in a project of mine, however, I would need a way to recognize the primary displays of a user. My idea was to add a is_primary boolean for Monitor objects which is returned when calling the get_monitors() function.

If this is something you approve of, I would implement this for all the supported environments and create a pull request. If not, I would simply fork this and add the functionality on my own.

Thank you and have a nice day

rr- commented 3 years ago

Since it's a backwards-compatible feature I don't see why we couldn't adapt it. In case the property is unavailable, I think we had a policy that we simply set it to None, so if for any reason a given enumerator has no knowledge whether a screen is primary, please set it to None rather than False.

cedric-uden commented 3 years ago

Okay cool. I will try and implement that. You'll hear from me within the next few days.