elkowar/eww

[BUG] Eww uses monitor model instead of a serial

开放

#1,086 创建于 2024年4月25日

 (5 条评论) (2 个反应) (0 位负责人)Rust (197 个派生)batch import
bughelp wanted

仓库指标

星标
 (4,647 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南