Merge pull request #321 from jeffeb3/reduce_min_size_cpus.py

Use the parameter format to determine the minwidth
This commit is contained in:
tobi-wan-kenobi 2018-11-09 16:44:41 +01:00 committed by GitHub
commit e5a003f961
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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")