[xrandr] Add option to hide output if only one combination is available
@@ -29,6 +29,8 @@ Configuration parameters:
(default None)
format: display format for xrandr
(default '{output}')
+ hide_if_single_combination: hide if only one combination is available.
+ (default False)
icon_clone: icon used to display a 'clone' combination
(default '=')
icon_extend: icon used to display a 'extend' combination
@@ -96,6 +98,7 @@ class Py3status:
fixed_width = True
force_on_start = None
format = '{output}'
+ hide_if_single_combination = False
icon_clone = '='
icon_extend = '+'
output_combinations = None
@@ -399,6 +402,10 @@ class Py3status:
self._set_available_combinations()
self._choose_what_to_display()
+ if (len(self.available_combinations) < 2 and
+ self.hide_if_single_combination):
+ full_text = ''
+ else:
if self.fixed_width is True:
output = self._center(self.displayed)
else:
