Skip to content

Easy way to refresh generic_poll_text on mouse click? #2982

Answered by elParaguayo
Sonic803 asked this question in Q&A
Discussion options

You must be logged in to vote

It's slightly easier now if you've got the latest git version installed as we just merged a change that would help here.

Assuming you do, you could add the following callback

{"Button1": lazy.widget["genpolltext"].function(lambda w: w.update(w.poll())}

If you're not on latest git then try

def tick_widget():
    qtile.cmd_spawn("qtile cmd-obj -o widget genpolltext -f eval -a 'self.update(self.poll())'")

...

{"Button1": tick_widget}

If you have more than one GenPollText widget the you may need to name it (name=...) and use that name instead of "genpolltext".

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@m-col
Comment options

@elParaguayo
Comment options

@m-col
Comment options

@elParaguayo
Comment options

@m-col
Comment options

Answer selected by Sonic803
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants