Merge pull request #133 from fredj/battery_click

[module/battery] Open gnome-power-statistics on left click
This commit is contained in:
tobi-wan-kenobi 2017-07-08 09:10:33 +02:00 committed by GitHub
commit 8941f60572

View file

@ -29,6 +29,8 @@ class Module(bumblebee.engine.Module):
if len(self._batteries) == 0: if len(self._batteries) == 0:
self._batteries = [ "/sys/class/power_supply/BAT0" ] self._batteries = [ "/sys/class/power_supply/BAT0" ]
self.update(widgets) self.update(widgets)
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
cmd="gnome-power-statistics")
def update(self, widgets): def update(self, widgets):
new_widgets = [] new_widgets = []