From 01c2bb6cbc5ca41f92f3e357be52701a0116c232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ko=C4=8Dka?= Date: Sun, 30 Jun 2019 22:49:23 +0200 Subject: [PATCH] [modules/arch-update] add format parameter --- bumblebee/modules/arch-update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bumblebee/modules/arch-update.py b/bumblebee/modules/arch-update.py index 8c86047..116f0b6 100644 --- a/bumblebee/modules/arch-update.py +++ b/bumblebee/modules/arch-update.py @@ -29,11 +29,15 @@ class Module(bumblebee.engine.Module): return len(packages) return 0 + @property + def _format(self): + return self.parameter("format", "Update Arch: {}") + def utilization(self, widget): - return 'Update Arch: {}'.format(self.packages) + return self._format.format(self.packages) def hidden(self): - return self.check_updates() == 0 + return self.check_updates() == 0 def update(self, widgets): self.packages = self.check_updates()