Mercurial > lbo > hg > myi3stat
changeset 37:c65c28c13591
Update README on renderers.
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Thu, 18 Feb 2016 16:22:09 +0100 |
parents | b0f65be9464d |
children | 0227aba85c56 |
files | README.md |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Thu Feb 18 16:22:00 2016 +0100 +++ b/README.md Thu Feb 18 16:22:09 2016 +0100 @@ -103,3 +103,19 @@ `--ordering` flag to change this behavior: myi3stat --ordering your_metric,clock --your_metric "%f %f" --clock + +## Advanced: How to add your renderer + +You can also customize the rendering part. By implementing the `Renderer` trait (defined in `src/render.rs`) and +registering it within `register_renderers()` in `src/main.rs`, you can define arbitrary -- usually text-based -- renderers. + +The currently available renderers are + +* i3status: This renders the metrics in a format suitable for `i3bar` to display them. +* plain: This renders metrics in a way similar to `dstat`, using ANSI colors on stdout. + +The renderer to be used is selected using the `--renderer` option: + + myi3stat --interval 1000 --renderer plain [...] + +