diff options
Diffstat (limited to 'py3status/modules/vnstat.py')
| -rw-r--r-- | py3status/modules/vnstat.py | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/py3status/modules/vnstat.py b/py3status/modules/vnstat.py index 5955581..a348f69 100644 --- a/py3status/modules/vnstat.py +++ b/py3status/modules/vnstat.py @@ -2,6 +2,21 @@ """ Display vnstat statistics. +Coloring rules. + +If value is bigger that dict key, status string will turn to color, specified in the value. +Example: +coloring = { + 800: "#dddd00", + 900: "#dd0000", +} +(0 - 800: white, 800-900: yellow, >900 - red) + +Format of status string placeholders: + {down} - download + {total} - total + {up} - upload + Requires: - external program called "vnstat" installed and configured to work. @@ -43,24 +58,7 @@ def get_stat(statistics_type): class Py3status: """ - Coloring rules. - - If value is bigger that dict key, status string will turn to color, specified in the value. - Example: - coloring = { - 800: "#dddd00", - 900: "#dd0000", - } - (0 - 800: white, 800-900: yellow, >900 - red) - - Format of status string. - - Placeholders: - total - total - up - upload - down - download """ - # available configuration parameters cache_timeout = 180 coloring = {} |
