Giter Site home page Giter Site logo

Crash during launch with Hyprland v0.35 KeyError: 'physical-width' and with Hyprland v0.37.1 KeyError: 'monitor' about nwg-displays HOT 5 CLOSED

nwg-piotr avatar nwg-piotr commented on May 20, 2024 1
Crash during launch with Hyprland v0.35 KeyError: 'physical-width' and with Hyprland v0.37.1 KeyError: 'monitor'

from nwg-displays.

Comments (5)

nwg-piotr avatar nwg-piotr commented on May 20, 2024 3

All the display detection part has already been re-written on the no-wlr-randr branch. However, the change also resolves #35, and relies on this commit on the Hyprland side. This means I cannot release until Hyprland > 0.36 is available. I know that v0.37.1 has been released yesterday, but on Arch we're still on v0.35.

from nwg-displays.

nwg-piotr avatar nwg-piotr commented on May 20, 2024 3

OK, I managed to reproduce the crash and find a quick fix while at the office. Will take a closer look at it tonight, at home.

from nwg-displays.

nwg-piotr avatar nwg-piotr commented on May 20, 2024 2

The commit above should prevent the program from crashing when Gdk.Monitor assignment fails. It won't resolve other problems we're still experiencing on Hyprland, however. E.g.: mirroring monitors are not listed as active. When you re-launch nwg-displays, they will show up as disabled with x and y values = 0. I don't think we can do much about it.

from nwg-displays.

iqbal1975 avatar iqbal1975 commented on May 20, 2024 1

Thanks for the quick turnaround @nwg-piotr 👍🏼 Now keeping fingers crossed that I can get mirroring to work on Hyprland ! 🤔 😅

from nwg-displays.

iqbal1975 avatar iqbal1975 commented on May 20, 2024

Update: New Error now on Arch with Hyprland v0.37.1 : KeyError: 'monitor'

nwg-displays

Settings: {'view-scale': 0.15, 'snap-threshold': 10, 'indicator-timeout': 500, 'custom-mode': [], 'use-desc': False}
Running on Hyprland
eDP-1 {'active': True, 'mirror': '', 'scale_filter': None, 'modes': [{'width': 1920, 'height': 1080, 'refresh': 60000.0}, {'width': 1920, 'height': 1080, 'refresh': 50000.0}], 'focused': True, 'adaptive_sync_status': 'disabled', 'description': 'Lenovo Group Limited 0x40B2', 'x': 0, 'y': 0, 'refresh': 60.0, 'logical-width': 1920, 'logical-height': 1080, 'physical-width': 1920.0, 'physical-height': 1080.0, 'transform': 'normal', 'scale': 1.0, 'dpms': True, 'ten_bit': False, 'model': '0x40B2', 'monitor': <__gi__.GdkWaylandMonitor object at 0x734d70502000 (GdkWaylandMonitor at 0x6076d1b3b070)>}
DP-2 {'active': False, 'modes': [{'width': 1920, 'height': 1080, 'refresh': 60000.0}, {'width': 1920, 'height': 1080, 'refresh': 59940.0}, {'width': 1920, 'height': 1080, 'refresh': 50000.0}, {'width': 1920, 'height': 1080, 'refresh': 29970.0}, {'width': 1920, 'height': 1080, 'refresh': 23980.0}, {'width': 1680, 'height': 1050, 'refresh': 59950.0}, {'width': 1600, 'height': 900, 'refresh': 60000.0}, {'width': 1280, 'height': 1024, 'refresh': 60020.0}, {'width': 1152, 'height': 864, 'refresh': 75000.0}, {'width': 1280, 'height': 720, 'refresh': 60000.0}, {'width': 1280, 'height': 720, 'refresh': 59940.0}, {'width': 1280, 'height': 720, 'refresh': 50000.0}, {'width': 1280, 'height': 720, 'refresh': 29970.0}, {'width': 1280, 'height': 720, 'refresh': 23980.0}, {'width': 1024, 'height': 768, 'refresh': 60000.0}, {'width': 800, 'height': 600, 'refresh': 60320.0}, {'width': 720, 'height': 576, 'refresh': 50000.0}, {'width': 720, 'height': 480, 'refresh': 59940.0}, {'width': 640, 'height': 480, 'refresh': 59940.0}, {'width': 640, 'height': 480, 'refresh': 59930.0}], 'mirror': '', 'scale_filter': None, 'focused': False, 'adaptive_sync_status': 'disabled', 'description': 'Sony SONY TV 0x01010101', 'x': 0, 'y': 0, 'refresh': 60.0, 'logical-width': 1920, 'logical-height': 1080, 'physical-width': 1920.0, 'physical-height': 1080.0, 'transform': 'normal', 'scale': 1.0, 'dpms': True, 'ten_bit': False, 'model': 'SONY TV'}
Traceback (most recent call last):
  File "/usr/bin/nwg-displays", line 33, in <module>
    sys.exit(load_entry_point('nwg-displays==0.3.15', '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 577, in create_display_buttons
    item["focused"], item["monitor"], mirror=item["mirror"])
                     ~~~~^^^^^^^^^^^
KeyError: 'monitor'

from nwg-displays.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.