nwg-piotr / nwg-displays

Output management utility for sway and Hyprland.
MIT License
334 stars 22 forks source link

nwg-displays v0.3.19 crash #60

Closed iqbal1975 closed 1 month ago

iqbal1975 commented 1 month ago

OS: Arch WM: Hyprland

hyprctl version
Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)

nwg-displays output

Settings: {'view-scale': 0.25, 'snap-threshold': 10, 'indicator-timeout': 500, 'custom-mode': [], 'use-desc': True}
Running on Hyprland
Traceback (most recent call last):
  File "/usr/bin/nwg-displays", line 33, in <module>
    sys.exit(load_entry_point('nwg-displays==0.3.19', 'gui_scripts', 'nwg-displays')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/nwg_displays/main.py", line 1252, in main
    create_display_buttons()
  File "/usr/lib/python3.12/site-packages/nwg_displays/main.py", line 569, in create_display_buttons
    outputs = list_outputs()
              ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/nwg_displays/tools.py", line 183, in list_outputs
    outputs_dict[key]["monitor"] = monitors[idx]
                                   ~~~~~~~~^^^^^
IndexError: list index out of range
DanViTrinh commented 1 month ago

I have the same issue

sathsarabandaraj commented 1 month ago

same here

sathsarabandaraj commented 1 month ago

I think issue is with the new update you can downgrade to last version v0.3.18

Remove current version sudo pacman -R nwg-displays

Clone aur pkg git clone https://aur.archlinux.org/nwg-displays.git then cd nwg-displays

Checkout to previous version commit git checkout 4e9fb36

build the pkg makepkg -si

sathsarabandaraj commented 1 month ago

I think issue is with the new update you can downgrade to last version v0.3.18

Remove current version sudo pacman -R nwg-displays

Clone aur pkg git clone https://aur.archlinux.org/nwg-displays.git then cd nwg-displays

Checkout to previous version commit git checkout 4e9fb36

build the pkg makepkg -si

There might be a easy way to downgrade but this worked for me

nwg-piotr commented 1 month ago

The above should prevent the program from crashing, but I still have no idea why the number of outputs is not equal to the number of Gdk.Monitor instances on your machines. I'd like to see your terminal output from the 0.3.20 version, even though it should not crash any longer.

Closing, as most likely fixed. Please reopen in case I'm wrong.