nwg-piotr / nwg-wrapper

Wrapper to display a script output or a text file content on the desktop in sway or other wlroots-based compositors
MIT License
139 stars 8 forks source link

Support specifying output by "make model serial", not just name #27

Closed gnull closed 1 year ago

gnull commented 1 year ago

The output names (like eDP-1) are unpredictable, and depend on the order in which you connect your external monitors. So the established way of binding programs and settings to outputs is to address the monitors by "Make model serial" (for example, Goldstar Company Ltd LG IPS FULLHD 604NTDV33634) which are unique. This is how Sway and Kanshi do it, for example.

Can you please add the support for this to nwg-wrapper? I'd like to be able to do nwg-wrapper -o 'Goldstar Company Ltd LG IPS FULLHD 604NTDV33634' and have the overlay drawn on the specified monitor.

https://git.sr.ht/~emersion/kanshi/tree/eddaeac2/item/main.c#L25

Here, you can find an example of how Kanshi implements the matching logic. (Maybe you could even borrow the code from there.)

Ivan

nwg-piotr commented 1 year ago

This is only true for Thunderbolt, otherwise they're the same every time. I've implemented "generic" output names in most of my other apps, but let me be honest: nwg-wrapper was written on demand, and is actually useless to me. My time is limited. Feel free to contribute, if you want.

gnull commented 1 year ago

This is only true for Thunderbolt, otherwise they're the same every time.

I have this behavior with my Thinkpad docking station (non-Thunderbolt).

My time is limited. Feel free to contribute, if you want.

Sure. Thanks!