summaryrefslogtreecommitdiffstats
path: root/py3status/modules/static_string.py
diff options
context:
space:
mode:
authorUltrabug <ultrabug@ultrabug.net>2015-07-09 10:56:47 +0200
committerUltrabug <ultrabug@ultrabug.net>2015-07-09 10:56:47 +0200
commit44aae475f1c87563a0877bc895ee86f93ec8cb24 (patch)
treec6b35c0af3ff398c539f4f83a5c6116a16ae0983 /py3status/modules/static_string.py
parentc4535a4d42eadf35e4d3945b197beb6319bbd356 (diff)
parentae7af22cd383a37ca72abe762643aedc271e6ec6 (diff)
Merge pull request #106 from frimdo/new_modules
new external_script and static_string modules by @frimdo
Diffstat (limited to 'py3status/modules/static_string.py')
-rw-r--r--py3status/modules/static_string.py39
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..c09176b
--- /dev/null
+++ b/py3status/modules/static_string.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+"""
+Display static text
+
+Display static text given by "format" parameter
+
+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
+
+@author frimdo ztracenastopa@centrum.cz
+"""
+
+
+class Py3status:
+ color = None
+ format = ''
+ separator = True
+
+ def static_string(self, i3s_output_list, i3s_config):
+
+ response = {
+ 'full_text': self.format,
+ 'color': self.color,
+ 'separator': self.separator
+ }
+
+ return response
+
+if __name__ == "__main__":
+ x = Py3status()
+ config = {
+ 'color_good': '#00FF00',
+ 'color_bad': '#FF0000',
+ }
+ print(x.static_string([], config))