Add text module

This commit is contained in:
enkore 2013-10-14 19:15:10 +02:00
parent 66d96c3286
commit 27d3d67a86
2 changed files with 36 additions and 0 deletions

View File

@ -653,6 +653,19 @@ __Settings:__
### text
Display static, colored text.
__Settings:__
* `text` — (required)
* `color` — HTML color code #RRGGBB (default: `None`)
### weather ### weather

23
i3pystatus/text.py Normal file
View File

@ -0,0 +1,23 @@
from i3pystatus import Module
class Text(Module):
"""
Display static, colored text.
"""
settings = (
"text",
("color", "HTML color code #RRGGBB"),
)
required = ("text",)
color = None
def init(self):
self.output = {
"full_text": self.text
}
if self.color:
self.output["color"] = self.color