Use the parameter format to determine the minwidth, instead of the default format.

This commit is contained in:
Jeff Eberl 2018-11-08 20:15:45 -07:00
parent 2f7931753e
commit bf5e814e45

View file

@ -20,8 +20,8 @@ import bumblebee.engine
class Module(bumblebee.engine.Module):
def __init__(self, engine, config):
widget = bumblebee.output.Widget(full_text=self.utilization)
widget.set("theme.minwidth", "99.9%")
super(Module, self).__init__(engine, config, widget)
widget.set("theme.minwidth", self._format.format(10.0-10e-20))
self._utilization = psutil.cpu_percent(percpu=False)
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
cmd="gnome-system-monitor")