Add text module
This commit is contained in:
parent
66d96c3286
commit
27d3d67a86
13
README.md
13
README.md
@ -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
23
i3pystatus/text.py
Normal 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
|
Loading…
Reference in New Issue
Block a user