From ae4873bac793245e7dea4719c8e0d1c7bc990d5f Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Wed, 10 Oct 2012 09:57:32 +0200 Subject: i3status - More temperature related fixes for OpenBSD, and a general feature - Temperature sensors can now set a 'max_threshold' value to color the output red if exceeded. - Allow for arbitrary temperature sensors nodes to be selected with 'path' on OpenBSD. --- i3status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index 915cbcc..5d3153c 100644 --- a/i3status.c +++ b/i3status.c @@ -243,6 +243,7 @@ int main(int argc, char *argv[]) { cfg_opt_t temp_opts[] = { CFG_STR("format", "%degrees C", CFGF_NONE), CFG_STR("path", NULL, CFGF_NONE), + CFG_INT("max_threshold", 75, CFGF_NONE), CFG_END() }; @@ -460,7 +461,7 @@ int main(int argc, char *argv[]) { CASE_SEC_TITLE("cpu_temperature") { SEC_OPEN_MAP("cpu_temperature"); - print_cpu_temperature_info(json_gen, buffer, atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format")); + print_cpu_temperature_info(json_gen, buffer, atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format"), cfg_getint(sec, "max_threshold")); SEC_CLOSE_MAP; } -- cgit v1.2.3