Followed config examples, but just couldn't get mouse_callbacks to work.
Here's the code for the widget:

def rofiselect(qtile):
    qtile.cmd_spawn('bash 
/home/booperlv/.config/rofi/scripts/selectmode.sh')

widget.TextBox(
    text="launcher",
    mouse_callbacks={'Button1': rofiselect}
),


Expected Behavior: execute the script, rofi will launch.
Resulting Behavior: literally nothing happens.

Launched qtile in tty1 so I could see the messages being sent on the event 
of a press:

libqtile core.py:_xpoll():L312  Got an exception in poll loop
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", 
line 280, in _xpoll
    ret = target(event)
  File "/usr/lib/python3.9/site-packages/libqtile/bar.py", line 340, in 
handle_ButtonPress
    widget.button_press(
  File "/usr/lib/python3.9/site-packages/libqtile/widget/base.py", line 
245, in button_press
    self.mouse_callbacks[name]()
TypeError: rofiselect() missing 1 required positional argument: 'qtile'
ERROR:libqtile:Got an exception in poll loop
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", 
line 280, in _xpoll
    ret = target(event)
  File "/usr/lib/python3.9/site-packages/libqtile/bar.py", line 340, in 
handle_ButtonPress
    widget.button_press(
  File "/usr/lib/python3.9/site-packages/libqtile/widget/base.py", line 
245, in button_press
    self.mouse_callbacks[name]()
TypeError: rofiselect() missing 1 required positional argument: 'qtile'


Please tell me if there is any more information I should provide.
Have been messing around with this for a few days now, and get the same 
error no matter what I launch on button press. Can't really deduct what's 
wrong honestly.
Tried both qtile-git from aur and qtile from the community repositories but 
still got the same error.

Some Basic Info (Just in case it's needed):
Arch Linux x86_64
5.11.16-arch1-1
CPU: Intel Celeron N2840 (2) @ 2.582GHz 
GPU: Intel Atom Processor Z36xxx/Z37xxx
Qtile Version: 0.17.1.dev166+g2f36ad91

Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qtile-dev/6243bce4-1aeb-4243-8c66-ff3685d83edbn%40googlegroups.com.

Reply via email to