plugins ======= .. toctree:: base battery clock disk imap load net uname uptime utils .. _plugins-write-your-own: Write your own -------------- Place it in `status.py` or import it there. You may use the provided :class:`pi3bar.plugins.base.Plugin`. Have a look at it and the shipped plugins for examples. In most cases you'll want to override :meth:`pi3bar.plugins.base.Plugin.cycle` to change instance attributes and :meth:`pi3bar.plugins.base.Plugin.on_click` to handle clicks. :meth:`pi3bar.plugins.base.Plugin.cycle` is called every :attr:`pi3bar.plugins.base.Plugin.ticks` seconds. (60 by default) .. _plugins-debugging: Debugging ~~~~~~~~~ Because pi3bar is communicating with i3bar through stdin and stdout, every print will break it! Instead, use the provided logging utilities: * :meth:`pi3bar.plugins.base.Plugin.debug` * :meth:`pi3bar.plugins.base.Plugin.info` * :meth:`pi3bar.plugins.base.Plugin.warning` * :meth:`pi3bar.plugins.base.Plugin.error` Set log level to ``WARNING``, ``INFO`` or ``DEBUG`` to get more verbose output: .. code-block:: python Pi3Bar( # ... plugins, log_level='DEBUG' ).run()