Hi Arsenii,

On Wed, Aug 16, 2017 at 03:10:58PM -0700, Arsenii Riazantsev wrote:
> Hi, everyone!
> 
> I am new to Python.I would like to make one custom widget and to call one 
> of it's method after pressing a key. I tried to import "Key" class and to 
> bind the button with the method, but it doesn't work. Is it not possible to 
> implement such a bind at all? Maybe there is another way to do it?

Try,

def foo(qtile):
    qtile.widgetMap['yourwidget'].your_method()

keys = [
    ...
    Key([mod], "k", lazy.function(foo)),
]

Cheers,

Tycho

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to