From f46c6a6569a96576fbaca0e6f8ec93f90b9883a7 Mon Sep 17 00:00:00 2001 From: Ultrabug Date: Thu, 9 Jul 2015 11:09:19 +0200 Subject: external_script and static_string modules code QA --- py3status/modules/static_string.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'py3status/modules/static_string.py') diff --git a/py3status/modules/static_string.py b/py3status/modules/static_string.py index c09176b..bb12ec2 100644 --- a/py3status/modules/static_string.py +++ b/py3status/modules/static_string.py @@ -1,35 +1,36 @@ # -*- coding: utf-8 -*- """ -Display static text - -Display static text given by "format" parameter +Display static text. Configuration parameters: - - text : text that should be printed - - separator : whether the separator is shown or not (True or False) - - format : text that should be printed - color : color of printed text - - on_click : read goo.gl/u10n0x + - format : text that should be printed + - separator : whether the separator is shown or not (true or false) @author frimdo ztracenastopa@centrum.cz """ +from time import time + class Py3status: + """ + """ + # available configuration parameters color = None format = '' separator = True def static_string(self, i3s_output_list, i3s_config): - response = { - 'full_text': self.format, + 'cached_until': time() + 60, 'color': self.color, + 'full_text': self.format, 'separator': self.separator - } - + } return response + if __name__ == "__main__": x = Py3status() config = { -- cgit v1.3