-
Notifications
You must be signed in to change notification settings - Fork 127
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
Screen Identifiers #79
Comments
@timothysoehnlin Hi! Screens implement the Identifiable-interface. You can use the value returned by the hash-function as an identifier. Would this work for you? |
Hmm, that sounds possible, but my concern is, if that is a consistent identifier across restarts/monitor plugin/unplug (different ports) etc. Plus, I would like to be able to enumerate the displays and provide feedback to the user to what screens are what. Ultimately I'm building a window manager built on phoenix, and I need to map applications to specific screens. I can foresee a time where the user is building their config visually but will need to be able to identify the screens to indicate where applications/windows should go. |
Good question. You can certainly try and see if it’s consistent over those cases. We can also make the UUID for the screens accessible through the API. |
I will take a look at the hash and see what it provides, but I'm assuming On Mon, Mar 7, 2016 at 10:14 AM, Kasper Hirvikoski <notifications@github.com
|
@timothysoehnlin It’s definitely not identical to an UUID, but it’s hard to know how the hash value is evaluated. Let me know what you find out. |
Will do, thanks! |
Okay, so I was able to get round to checking this, and it seems the Screen ID is consistent across reboots/ and the Phoenix app restart. So it should suffice, but that would just mean that I need to enumerate the displays and associate with the hashes. Going back to the original intent, I'm thinking it would still be nice to have this provided by the framework to create a common platform for building multi window management. Not sure if it helps, but this is the output I'm trying to work with: https://github.com/timothysoehnlin/PhoenixLayout/blob/master/src/config.ts Ultimately I want to provide a more reasonable way to identify screens by hand. Though if/when I get around to building the UI for this, that would be mitigated pretty heavily. |
Spoke too soon. I've been having the event "screensDidChange" fire seemingly at random, but I finally diagnosed it. It appears to be tied to the switch between integrated and dedicated graphics on my MBP. This means that the screen hash() is not sufficient for identify displays. |
@timothysoehnlin OS X will fire that event not only when attaching or detaching displays, but also when their options are changed. Changing the graphics card would most likely go under this. I think it’s reasonable to add UUID-support for screens to the API. I’ll sort this out soon. |
Awesome. Thanks so much. Looking forward to it. |
@timothysoehnlin This has now been implemented in master and will be released in 2.1. See |
Right now, the only I can find to identify screens is by dimension. It would be great to be able to get a device identifier, especially when you have multiple monitor setups with the same resolutions.
The text was updated successfully, but these errors were encountered: