qtile-extras: AttributeError when using GlobalMenu()

Whenever I try to use GlobalMenu, I don’t get any response when reloading config. The module is correctly imported since I’m using ALSAWidget as well and it works fine. The logs only show a configuration error, but my configuration of that widget is only GlobalMenu(),.

I use qtile cmd-obj -o cmd -f reload_config but it doesn´t show any output. logs: https://dpaste.com/67YXMXXZW
qtile check log: https://dpaste.com/HJBHSC7L3

When I execute de config.py as a Python program it shows the following output: ❯ python .config/qtile/config.py | wgetpaste Traceback (most recent call last): File "/home/javigo07/.config/qtile/config.py", line 1, in <module> from modules import * File "/home/javigo07/.config/qtile/modules/__init__.py", line 4, in <module> from modules.screens import screens, layouts, floating_layout File "/home/javigo07/.config/qtile/modules/screens.py", line 94, in <module> widget.GlobalMenu(), File "/usr/lib/python3.10/site-packages/qtile_extras/widget/__init__.py", line 104, in __getattr__ raise AttributeError AttributeError

Following the path, it shows me this section of code: 102 def __getattr__(name): 103 if name not in registry: 104 raise AttributeError 105 106 if name in widgets: 107 package = "qtile_extras.widget" 108 else: 109 package = "libqtile.widget" 110 111 module_path = f"{package}.{registry[name]}" 112 113 return import_class(module_path, name, fallback=fallback)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

Yeah - it only works for apps that have implemented the spec.

Glad it’s working.

Alright, now it shows for some apps (Telegram-Desktop, KeePassXC, VLC). Others like Firefox don’t show anything (but I guess that’s because Firefox doesn’t send the menu through dbus as VLC, according to the GlobalMenu() docs you wrote).

In fact, solving this also fixed my Mpris2 widget that didn’t work before that. Thank you so much.