From ada99c0af5665828abc725923bf2f104c577c852 Mon Sep 17 00:00:00 2001 From: Ultrabug Date: Tue, 31 Mar 2015 13:14:25 +0200 Subject: move config parameters on every module docstring, overall QA --- py3status/modules/vnstat.py | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'py3status/modules/vnstat.py') 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 = {} -- cgit v1.3