[FEATURE] Allow output names for wayland monitors
Description of the requested feature
Essentially this would allow someone to assign a window to a display by inputting the name of the monitor(e.g. "eDP-1") instead of the monitor number.
Proposed configuration syntax
The syntax for this would look like this
:monitor "eDP-1"
Additional context
This is basically the same as PR #522 but for Wayland.
As discussed previously on that very PR, this is really hard to do properly since GTK doesn't actually expose that info. I'll have to look if things have changed on the gtk-rs side and come back with an update.
@viandoxdev are you still working on this? I made a quick lookup and
let monitor: gdk::Monitor = monitors.item(0).unwrap().downcast().unwrap();
println!("Monitor Name: {:?}", monitor.description());
prints "Monitor Name: Some("AOC 2369M AJDG89A003953 (HDMI-A-1)")"
which you could get the name from
otherwise, i would have time next week to make a pr
@viandoxdev are you still working on this? I made a quick lookup and
let monitor: gdk::Monitor = monitors.item(0).unwrap().downcast().unwrap(); println!("Monitor Name: {:?}", monitor.description());prints "Monitor Name: Some("AOC 2369M AJDG89A003953 (HDMI-A-1)")" which you could get the name fromotherwise, i would have time next week to make a pr
I'm not particularly interested in implementing this so don't hesitate to make a PR. I'm not convinced you can reliably extract the name from that description (if that's what you intend to do), but it would be great if you could manage, good luck
Still working on it, but i am quite busy. Might take two weeks.
Did a little more digging and GDK gets its information from https://wayland.app/protocols/xdg-output-unstable-v1#zxdg_output_v1:event:description whose output differs by compositor. In gtk4, it would be possible to get this information from wl_output, so,
tldr: not really possible at the moment without very janky solutions.