[modules/arch-update] add format parameter

This commit is contained in:
Jan Kočka 2019-06-30 22:49:23 +02:00
parent 5f3530d258
commit 01c2bb6cbc

View file

@ -29,11 +29,15 @@ class Module(bumblebee.engine.Module):
return len(packages) return len(packages)
return 0 return 0
@property
def _format(self):
return self.parameter("format", "Update Arch: {}")
def utilization(self, widget): def utilization(self, widget):
return 'Update Arch: {}'.format(self.packages) return self._format.format(self.packages)
def hidden(self): def hidden(self):
return self.check_updates() == 0 return self.check_updates() == 0
def update(self, widgets): def update(self, widgets):
self.packages = self.check_updates() self.packages = self.check_updates()