diff options
| author | Dominik <frimldom@gmail.com> | 2015-06-25 13:38:28 +0200 |
|---|---|---|
| committer | Dominik <frimldom@gmail.com> | 2015-06-25 13:38:28 +0200 |
| commit | ac718e7b771302ae6c0c9408ad47333f21919bab (patch) | |
| tree | 3e4cece9755b90297b9637e43a063c54cc6e3834 /py3status/modules/static_string.py | |
| parent | c4535a4d42eadf35e4d3945b197beb6319bbd356 (diff) | |
Adding external_script and static_string modules and mentioning them in readme
Diffstat (limited to 'py3status/modules/static_string.py')
| -rw-r--r-- | py3status/modules/static_string.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/py3status/modules/static_string.py b/py3status/modules/static_string.py new file mode 100644 index 0000000..d525238 --- /dev/null +++ b/py3status/modules/static_string.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +""" +Display static text + +Display static text given by "text" parameter + +Configuration parameters: + - text : text that should be printed + - separator : whether the separator is shown or not (True or False) + - color : color of printed text + - on_click : read goo.gl/u10n0x + +@author frimdo ztracenastopa@centrum.cz +""" + +class Py3status: + color = None + text = "" + separator = True + + def static_string(self, i3s_output_list, i3s_config): + + response = { + 'full_text': self.text, + 'color': self.color, + 'separator': self.separator + } + + return response + +if __name__ == "__main__": + from time import sleep + x = Py3status() + config = { + 'color_good': '#00FF00', + 'color_bad': '#FF0000', + } + print(x.static_string([], config)) + |
