nwg-piotr / nwg-displays

Output management utility for sway and Hyprland.
MIT License
334 stars 22 forks source link

Feature: option to use `desc: Monitor` instead of port name #23

Closed herrwusel closed 11 months ago

herrwusel commented 12 months ago

Thanks for nwg-displays. This might be a hyprland specific wish, but it would be nice to have the option to use the monitors' description instead of the port name. The background is that I have multiple workplaces with different monitor setups. Using the description would make using different setups more robust.

nwg-piotr commented 12 months ago

Nothing in the Hyprland wiki indicates that we can use generic names, but I've just tried:

monitor=Dell Inc. DELL E2214H 2RK1Y4333FVU,1920x1080@60.0,1366x0,1.0
monitor=AU Optronics 0x315C,1366x768@60.02,0x312,1.0

...and it seems to work well. If so, your request is doable.

herrwusel commented 12 months ago

It is written above this section (scroll up a bit). It follows the syntax desc: Monitor description.

nwg-piotr commented 12 months ago

Thanks.

I'll add what you requested when I'm done with what I'm working on at the moment, probably this week.

nwg-piotr commented 12 months ago

It seem we have a problem. Setting default workspace for a monitor seems not to work with descriptions.

workspace=HDMI-A-1,1

works.

workspace=AOC 2475WR F17H4QA000449,1

does not work.

Also

workspace=1,monitor:HDMI-A-1,default:true

works, but

workspace=1,monitor:AOC 2475WR F17H4QA000449,default:true

does not work.

Unless I'm doing something wrong, we've reached a dead end.

nwg-piotr commented 12 months ago

Yes, it does not work yet.

https://github.com/hyprwm/Hyprland/pull/2670

nwg-piotr commented 11 months ago

The problem on the Hyprland side has just been resolved by @MightyPlaza (thanks again!).

@herrwusel - The feature you requested must wait on the desc branch till the nearest Hyprland release. Of course you can test it right now, if you install the development version of Hyprland.

2023-07-12-033412_hypr_screenshot

herrwusel commented 11 months ago

Thanks for your quick implementation. I'll give it a try and report back.

nwg-piotr commented 11 months ago

I discovered a minor bug. Will fix later today.