summaryrefslogtreecommitdiff
path: root/i3status.c
diff options
context:
space:
mode:
Diffstat (limited to 'i3status.c')
-rw-r--r--i3status.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/i3status.c b/i3status.c
index 19ad5a3..54d850f 100644
--- a/i3status.c
+++ b/i3status.c
@@ -413,7 +413,10 @@ int main(int argc, char *argv[]) {
cfg_opt_t usage_opts[] = {
CFG_STR("format", "%usage", CFGF_NONE),
+ CFG_FLOAT("max_threshold", 200, CFGF_NONE),
+ CFG_FLOAT("degraded_threshold", 200, CFGF_NONE),
CFG_CUSTOM_ALIGN_OPT,
+ CFG_CUSTOM_COLOR_OPTS,
CFG_CUSTOM_MIN_WIDTH_OPT,
CFG_CUSTOM_SEPARATOR_OPT,
CFG_CUSTOM_SEP_BLOCK_WIDTH_OPT,
@@ -726,7 +729,7 @@ int main(int argc, char *argv[]) {
CASE_SEC("cpu_usage") {
SEC_OPEN_MAP("cpu_usage");
- print_cpu_usage(json_gen, buffer, cfg_getstr(sec, "format"));
+ print_cpu_usage(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getfloat(sec, "max_threshold"), cfg_getfloat(sec, "degraded_threshold"));
SEC_CLOSE_MAP;
}
}