Fix arch_updates: Add hide_if_zero (?)
@@ -11,6 +11,8 @@ Configuration parameters:
cache_timeout: How often we refresh this module in seconds (default 600)
format: Display format to use
(default 'UPD: {pacman}' or 'UPD: {pacman}/{aur}')
+ hide_if_zero: Don't show on bar if False
+ (default False)
include_aur: Set to True to use 'cower' to check for AUR updates
(default False)
@@ -33,8 +35,8 @@ class Py3status:
# available configuration parameters
cache_timeout = 600
format = ''
- include_aur = False
hide_if_zero = False
+ include_aur = False
_format_pacman_only = 'UPD: {pacman}'
_format_pacman_and_aur = 'UPD: {pacman}/{aur}'
@@ -59,10 +61,9 @@ class Py3status:
if self.hide_if_zero and pacman_updates == 0 and aur_updates == 0:
response['full_text'] = ''
else:
- response['full_text'] = self.py3.safe_format(
- self.format, {'pacman': pacman_updates, 'aur': aur_updates}
- )
-
+ response['full_text'] = self.py3.safe_format(self.format,
+ {'pacman': pacman_updates,
+ 'aur': aur_updates})
return response
def _check_pacman_updates(self):
