eww icon indicating copy to clipboard operation
eww copied to clipboard

[FEATURE] Allow output names for wayland monitors

Open hiszd opened this issue 2 years ago • 6 comments

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.

hiszd avatar Aug 15 '23 14:08 hiszd

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 avatar Aug 15 '23 16:08 viandoxdev

@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

luposmi avatar Sep 13 '23 20:09 luposmi

@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

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

viandoxdev avatar Sep 13 '23 20:09 viandoxdev

Still working on it, but i am quite busy. Might take two weeks.

luposmi avatar Sep 19 '23 21:09 luposmi

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.

luposmi avatar Sep 24 '23 09:09 luposmi