summaryrefslogtreecommitdiff
path: root/i3status.c
diff options
context:
space:
mode:
authorRaphael Michel <webmaster@raphaelmichel.de>2012-12-31 18:13:36 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-02-22 14:09:58 +0100
commit6279964c6b29a549757f59c5a05c9b821a2a4bc5 (patch)
treef64a7a4704f75fe06b00fd39d009de97eac818fa /i3status.c
parent67c2c1a7ead6bcdcd07080e581013fa7a0b58b6f (diff)
Add colorized output for load avg
Diffstat (limited to 'i3status.c')
-rw-r--r--i3status.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/i3status.c b/i3status.c
index 3fe3f47..e8e44d4 100644
--- a/i3status.c
+++ b/i3status.c
@@ -257,6 +257,8 @@ int main(int argc, char *argv[]) {
cfg_opt_t load_opts[] = {
CFG_STR("format", "%1min %5min %15min", CFGF_NONE),
+ CFG_INT("max_threshold", 5, CFGF_NONE),
+ CFG_CUSTOM_COLOR_OPTS,
CFG_END()
};
@@ -460,7 +462,7 @@ int main(int argc, char *argv[]) {
CASE_SEC("load") {
SEC_OPEN_MAP("load");
- print_load(json_gen, buffer, cfg_getstr(sec, "format"));
+ print_load(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getint(sec, "max_threshold"));
SEC_CLOSE_MAP;
}