nwg-piotr/nwg-wrapper

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

gnull opened this issue · 2 comments

gnull commented

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

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