nwg-piotr / nwg-displays

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

KeyError: 'availableModes' #56

Closed JesusR3kt closed 2 months ago

JesusR3kt commented 3 months ago

I use the nwg-shell installed on Manjaro with Hyprland. When running nwg-displays in the terminal I get following error:

Settings: {'view-scale': 0.15, 'snap-threshold': 10, 'indicator-timeout': 500, 'custom-mode': [], 'use-desc': False}
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.16', 'gui_scripts', 'nwg-displays')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nwg_displays/main.py", line 1252, in main
    create_display_buttons()
  File "/usr/lib/python3.11/site-packages/nwg_displays/main.py", line 569, in create_display_buttons
    outputs = list_outputs()
              ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nwg_displays/tools.py", line 146, in list_outputs
    for item in m["availableModes"]:
                ~^^^^^^^^^^^^^^^^^^
KeyError: 'availableModes'

Currently running version 0.3.16

If I need to supply more information please let me know.

nwg-piotr commented 3 months ago

Which version of Hyprland are you on? Hyprland returns available modes since v0.36.

JesusR3kt commented 3 months ago

OK, then it's an issue with Manjaro, there the package is still on v0.35 when sourcing from manjaro/extra.

Thanks for your response :) And thanks for your tools in general, they are great!

nwg-piotr commented 3 months ago

Thank you. If it comes to your issue, you could try hyprland-git from AUR.

JesusR3kt commented 2 months ago

BTW updating the Hyprland version did the trick.

For anyone else wondering how to switch manjaro mirrors to unstable for the newest mirrors here is the guide: https://wiki.manjaro.org/index.php/Switching_Branches