i3pyblocks.blocks.basic
Blocks that does not have any extra dependency except i3pyblock itself.
Module Contents
Classes
Block that shows arbitrary text in i3pyblocks. |
- class i3pyblocks.blocks.basic.TextBlock(full_text: str, **kwargs)
Bases:
i3pyblocks.blocks.BlockBlock that shows arbitrary text in i3pyblocks.
- Parameters
full_text – Text to be shown.
**kwargs – Arguments to be passed to
i3pyblocks.blocks.base.Block.update_state()method.
- async start(self) None
Starts a Block.
This is an abstract method, so it should be overriden.
This method is where you generally wants to put your main loop to update the state of the Block. This loop can either be triggered by events or can be an infinity loop. It can even be a single call to
update(), but in this case your Block will only be updated once.