]> git.sur5r.net Git - i3/i3status/commitdiff
Fix trailing whitespaces, document cpu_usage in manpage
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 6 May 2011 11:17:26 +0000 (13:17 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 6 May 2011 11:17:26 +0000 (13:17 +0200)
i3status.c
man/i3status.man
src/print_cpu_usage.c

index 542d270f5a9f3b4875c3057f9a700bf016122dbe..ebef5138110a601be4e8eefa11f6df02f3c8230f 100644 (file)
@@ -226,7 +226,7 @@ int main(int argc, char *argv[]) {
                 CFG_STR("format", "%5min %10min %15min", CFGF_NONE),
                 CFG_END()
         };
-        
+
         cfg_opt_t usage_opts[] = {
                 CFG_STR("format", "%usage", CFGF_NONE),
                 CFG_END()
@@ -376,7 +376,7 @@ int main(int argc, char *argv[]) {
 
                         CASE_SEC_TITLE("cpu_temperature")
                                 print_cpu_temperature_info(atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format"));
-                        
+
                         CASE_SEC("cpu_usage")
                                 print_cpu_usage(cfg_getstr(sec, "format"));
                 }
index 7813229f4084c26be2d395e822dc73057ddb954a..786271e35093d3aedacf15b3245565952210ab70 100644 (file)
@@ -200,6 +200,14 @@ Gets the temperature of the given thermal zone.
 
 *Example format*: +T: %degrees °C+
 
+=== CPU Usage
+
+Gets the percentual CPU usage from +/proc/stat+.
+
+*Example order*: +cpu_usage+
+
+*Example format*: +%usage+
+
 === Load
 
 Gets the system load (number of processes waiting for CPU time in the last
index d80693d312f878fc95721cc1b797a77587e6afad..d5913b0166df76ce0a2469c523a5846e75ff4f83 100644 (file)
@@ -14,7 +14,7 @@ static int prev_idle  = 0;
  * percentage.
  *
  */
-void print_cpu_usage(const char *format) { 
+void print_cpu_usage(const char *format) {
         const char *walk;
         char buf[1024];
         int curr_user, curr_nice, curr_system, curr_idle, curr_total;