Interesting. I would have expected an error from that one as callbacks are
executed by calling the function that's passed. Assuming you're on 0.16.1,
clicking the mouse would try to make the script run the following:
lazy.group['scratchpad'].dropdown_toggle("xterm")(qtile)
This shouldn't work as lazy objects aren't callable.
I tried changing the callback to: lambda qtile:
lazy.group['scratchpad'].dropdown_toggle('xterm') but that also didn't work.
I then tried creating a function in my config file:
def scratch_callback(qtile):
lazy.group['scratchpad'].dropdown_toggle("term")
and set the callback to "scratch_callback". That didn't work.
Lastly, I changed the callback function to:
def scratch_callback(qtile):
qtile.groups_map["scratchpad"].dropdowns["term"].toggle()
And that *did* work but only after I'd opened the scratchpad by the key
press once first.
All very confusing.
On Thursday, 3 December 2020 at 01:28:02 UTC [email protected] wrote:
>
> Hello guys
> I tried to implement a textbox widget to toggle the terminal dropdown,
> when left-clik on it. I added this code to the textbox widget:
>
> mouse_callbacks = {
> 'Button1': lazy.group['scratchpad'].dropdown_toggle("term")}
> I did not get any error, but when I click on the textbox, nothing happens!
> Can someone help me to fix this please?
>
> 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/18b074cc-f2bf-4e5d-baab-e42c439e3772n%40googlegroups.com.