[modules/arch-update] add format parameter
This commit is contained in:
parent
5f3530d258
commit
01c2bb6cbc
1 changed files with 6 additions and 2 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue