Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get number of displays #87

Closed
rgrams opened this issue Sep 19, 2018 · 3 comments
Closed

Get number of displays #87

rgrams opened this issue Sep 19, 2018 · 3 comments

Comments

@rgrams
Copy link

rgrams commented Sep 19, 2018

It would be great if DefOS had a function to get the number of available displays. Also, if possible, to get the name or some kind of identifier for each display.

@dapetcu21
Copy link
Collaborator

My proposal:

local displays = defos.get_displays()

Returns a table displays, where displays[1] would be the main display. Each display would be a table that would contain:

  • bounds = { x = 0, y = 0, width = 1920, height = 1080 }, which would delimit the rectangle in client space (coordinates to be passed to defos.set_window_size()).
  • resolution = { width = 3840, height = 2160 }, which might be different from screen bounds on, for example macOS when scaling is turned on on Retina displays.
  • refresh_rate = 60
  • name = "LG Ultra HD"

@rgrams
Copy link
Author

rgrams commented Sep 19, 2018

Yup! That would be perfect!

@dapetcu21
Copy link
Collaborator

Closed by #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants