Py3status: frame doesn't respond to py3-cmd click event

Created on 15 May 2018  路  6Comments  路  Source: ultrabug/py3status

In my py3status setup I have the pomodoro module in a frame because I don't want to display it when I am not working. Aiming for a mouseless setup, I am trying to toggle the frame visibility with
py3-cmd click 1 'frame pomo' without any success. Am I doing something wrong ?

Here is the relevant i3status snippet. And of course, it works if I click on the small +/- button.

frame pomo {
    format = '{output}{button}'
    pomodoro {
        format = "{mmss}"
    }
}
bug

Most helpful comment

It will be available in 3.12 thanks to @lasers !

All 6 comments

I think that when we use command py3-cmd click 1, we send a fake click event with button, name, and instance.... and without x, y, relative_x, relative_y, index, etc to the module. For frame module to be toggleability via commands, I think we would need to be able to give index too... or to be more specific, an index saying button.

However, I can help you out with your problem. Not long ago, I made pomodoro from scratch pull request. Seeing how you want a mouseless setup, you should try #1313 with this format:

order += "pomodoro"
pomodoro {
    format = '[\?if=alarm&color=gold \u23f0 ]'
    format += '[\?if=state&color=state [{progress_bar} ]{time} ]'
    format += '[\?max_length=1 {name}][\?if=name=Pomodoro {pomodoro}|{break}]'
    allow_urgent = False
}

Play around. Maybe you prefer urgent instead of alarm clock icon or such. Either way, have fun.

@mrpewpew Hi. Can we get an update? Did you try聽new pomodoro?

@lasers I am sticking to vanilla pomodoro for the moment since I can also use it without the mouse. Will change it if I am not satisfied

@mrpewpew thanks for this report. You have found an issue. The problem is although we can perform a click on a module we cannot specify which part we click. So you are sending a click but it never gets to the button. This needs a solution and I think really requires a change to the whole clicking functionality to do what you want elegantly.

Hi @mrpewpew thanks for reporting this.

I'm proposing a working solution on PR #1358 , if you can please test it and report back

As far as I tested it, it works great ;)

It will be available in 3.12 thanks to @lasers !

Was this page helpful?
0 / 5 - 0 ratings