Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Eww uses monitor model instead of a serial #1086

Open
3 tasks done
coderPaddyS opened this issue Apr 25, 2024 · 4 comments
Open
3 tasks done

[BUG] Eww uses monitor model instead of a serial #1086

coderPaddyS opened this issue Apr 25, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@coderPaddyS
Copy link

coderPaddyS commented Apr 25, 2024

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

Spawning a widget on each monitor is only possible, if they aren't the same model. If they are, eww will spawn the widget on the same monitor. Using the monitor serial primarily and the model as fallback (or any property specified by the user) or the monitor description would resolve this issue.
Usage of an index as id could be a solution, but sometimes the monitor ordering is not the same as reported by the DE (in my case Hyprland) as seen below. Eww uses the same ordering in which my DE lists the monitors, not by the ID.

Reproducing the issue

$>eww open bar --id 1 --arg screen=609NTFAF4483
failed to open window `1`

Caused by:
    Failed to get monitor 609NTFAF4483
    The available monitors are:
        [0] 0x1551
        [1] 24EB23
        [2] 24EB23

The monitor ordering:

$> hyprctl monitors
Monitor eDP-1 (ID 0):
        3840x2400@59.99400 at 960x1200
        description: Sharp Corporation 0x1551
        make: Sharp Corporation
        model: 0x1551
        serial:

Monitor DP-8 (ID 2):
        1920x1200@59.95000 at 1920x0
        description: LG Electronics 24EB23 305NDGL87831
        make: LG Electronics
        model: 24EB23
        serial: 305NDGL87831


Monitor DP-7 (ID 1):
        1920x1200@59.95000 at 0x0
        description: LG Electronics 24EB23 609NTFAF4483
        make: LG Electronics
        model: 24EB23
        serial: 609NTFAF4483

Expected behaviour

Eww spawns a window on each monitor correctly by specifying the serial, model or description of the monitor.

Additional context

2024-04-25T15:14:54,802040489+02:00

@coderPaddyS coderPaddyS added the bug Something isn't working label Apr 25, 2024
@krims0n32
Copy link

Having the same issue, after suspend/resume or reboot eww sees the monitor order differently which puts my bars in the wrong location. wayland-info and hyprctl monitors always shows the correct info, order is not changed there.

I have tried using the JSON monitor matcher but specifying DP-1/2/3 doesn't seem to do anything, only matching the monitor model is working but as I have 3 screens and 2 are of the same model this is a problem.

Making matching possible on display port, e.g. DP-1/2/3 would be a nice solution and I guess according to the docs this should be working so this probably is a bug?

@elkowar
Copy link
Owner

elkowar commented Apr 27, 2024

Yea, I've noticed the issue that monitor specifications on wayland are kind of annoyingly meaningless. I haven't yet figured out how to get any more specific info through GTK, though -- if anyone has any ideas or would be willing to tackle an implementation of a fix for this, I'd love that!
GTK doesn't give me all that much info about the underlying wayland monitor, and I'm unsure how much details I can get about the monitor in a standardized way on wayland either way :/

@elkowar elkowar added the help wanted Extra attention is needed label Apr 27, 2024
@coderPaddyS
Copy link
Author

coderPaddyS commented Apr 29, 2024

I'm not that experienced with the wayland protocol and gtk, but it seems that migrating to gtk4 would atleast allow to get the monitor information in an easy fashion.
Would it be feasible to migrate? Is a migration even wanted?
If so, I'd could try to implement the migration, but someone with more experience should most definitely look at it thoroughly and it would most likely not be backwards compatible to the gtk3 based config.

@krims0n32
Copy link

There is some discussion and a proposed fix for another bar here:

Aylur/ags#363

Maybe this could help you? If I can do anything to debug this, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants