external_script: make output localization optional
@@ -13,6 +13,8 @@ Configuration parameters:
cache_timeout: how often we refresh this module in seconds
(default 15)
format: see placeholders below (default '{output}')
+ localize: should script output be localized (if available)
+ (default True)
script_path: script you want to show output of (compulsory)
(default None)
strip_output: shall we strip leading and trailing spaces from output
@@ -49,6 +51,7 @@ class Py3status:
# available configuration parameters
cache_timeout = 15
format = '{output}'
+ localize = True
script_path = None
strip_output = False
@@ -61,7 +64,7 @@ class Py3status:
response = {}
response['cached_until'] = self.py3.time_in(self.cache_timeout)
try:
- output = self.py3.command_output(self.script_path, shell=True, localized=True)
+ output = self.py3.command_output(self.script_path, shell=True, localized=self.localize)
output_lines = output.splitlines()
if len(output_lines) > 1:
output_color = output_lines[1]
