summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Schreiber <mark7@alumni.cmu.edu>2016-04-13 09:07:12 -0700
committerMark Schreiber <mark7@alumni.cmu.edu>2016-04-13 09:11:32 -0700
commit1e8dab273d8542366c098dfcda37756db6b2bcd7 (patch)
tree4c9fbbee9124a01a080c6b6ff635d8a5d5304093 /include
parentc094f47b457104c267dd55782efc34c47f05cf9d (diff)
Add CPU usage color thresholds
CPU usage had previously not supported the color option. Add support for a "degraded" state above which the degraded color is used, and a higher "bad" state above which the "bad" color is used. One possible use for these might be indicating whether one or all cores are saturated. Unlike the color settings for other, these are set high enough to be disabled by default. This is done because i3status determines CPU usage over only the last display interval, which means that, a user with a low refresh rate might see frequent, potentially-annoying color changes.
Diffstat (limited to 'include')
-rw-r--r--include/i3status.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/i3status.h b/include/i3status.h
index 7e756e2..b4cf83f 100644
--- a/include/i3status.h
+++ b/include/i3status.h
@@ -216,7 +216,7 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface,
void print_run_watch(yajl_gen json_gen, char *buffer, const char *title, const char *pidfile, const char *format, const char *format_down);
void print_path_exists(yajl_gen json_gen, char *buffer, const char *title, const char *path, const char *format, const char *format_down);
void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const char *path, const char *format, int);
-void print_cpu_usage(yajl_gen json_gen, char *buffer, const char *format);
+void print_cpu_usage(yajl_gen json_gen, char *buffer, const char *format, const float max_threshold, const float degraded_threshold);
void print_eth_info(yajl_gen json_gen, char *buffer, const char *interface, const char *format_up, const char *format_down);
void print_load(yajl_gen json_gen, char *buffer, const char *format, const float max_threshold);
void print_volume(yajl_gen json_gen, char *buffer, const char *fmt, const char *fmt_muted, const char *device, const char *mixer, int mixer_idx);