[main] Redraw on click

Whenever a module in the bar is clicked, immediately redraw the line, to
make for a snappier user experience (especially when muting/unmuting).
This commit is contained in:
Tobias Witek 2016-11-04 19:11:10 +01:00
parent 89b97d7283
commit b99c454a5a
3 changed files with 15 additions and 5 deletions

View file

@ -25,10 +25,11 @@ def read_input(output):
button = event.get("button", -1)
)
subprocess.Popen(shlex.split(cb), stdout=DEVNULL, stderr=DEVNULL)
output.redraw()
class i3bar(bumblebee.output.Output):
def __init__(self, theme):
super(i3bar, self).__init__(theme)
def __init__(self, refresh, theme):
super(i3bar, self).__init__(refresh, theme)
self._data = []
self.add_callback("i3-msg workspace prev_on_output", 4)