From 9307ff9d131a70164a50e57e3aa3115c92715925 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 13 Dec 2009 13:59:59 +0100 Subject: [PATCH] The load values represent 1,5,15 min, not 5,10,15 min (Thanks Chris) --- i3status.conf | 2 +- src/print_load.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/i3status.conf b/i3status.conf index 1e120cf..774aa06 100644 --- a/i3status.conf +++ b/i3status.conf @@ -42,7 +42,7 @@ time { } load { - format = "%5min" + format = "%1min" } cpu_temperature 0 { diff --git a/src/print_load.c b/src/print_load.c index c0d9494..9fe1964 100644 --- a/src/print_load.c +++ b/src/print_load.c @@ -20,14 +20,14 @@ void print_load(const char *format) { continue; } - if (BEGINS_WITH(walk+1, "5min")) { + if (BEGINS_WITH(walk+1, "1min")) { (void)printf("%1.2f", loadavg[0]); - walk += strlen("5min"); + walk += strlen("1min"); } - if (BEGINS_WITH(walk+1, "10min")) { + if (BEGINS_WITH(walk+1, "5min")) { (void)printf("%1.2f", loadavg[1]); - walk += strlen("10min"); + walk += strlen("5min"); } if (BEGINS_WITH(walk+1, "15min")) {