elkowar/eww

[BUG] Eww uses monitor model instead of a serial

Open

#1,086 opened on Apr 25, 2024

View on GitHub
 (5 comments) (2 reactions) (0 assignees)Rust (4,647 stars) (197 forks)batch import
bughelp wanted

Description

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

Contributor guide

[BUG] Eww uses monitor model instead of a serial · elkowar/eww#1086 | Good First Issue