summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@openbsd.org>2012-10-10 09:57:32 +0200
committerMichael Stapelberg <michael@stapelberg.de>2012-10-16 10:51:15 +0200
commitae4873bac793245e7dea4719c8e0d1c7bc990d5f (patch)
tree5d17159a3ccf4e850cc861e15c07ab9cedcb6eae /include
parent1c2517a3998385dbfca0559aca3ba7e72b5c216c (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/i3status.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/i3status.h b/include/i3status.h
index 93f9791..fc984f8 100644
--- a/include/i3status.h
+++ b/include/i3status.h
@@ -27,16 +27,8 @@ enum { O_DZEN2, O_XMOBAR, O_I3BAR, O_NONE } output_format;
#define BATT_STATE "hw.acpi.battery.state"
#elif defined(__OpenBSD__)
-/*
- * Due to the fact there are various ways to obtain a temperature reading, THERMAL_ZONE will need
- * to be adjustable enough for those situations. As it can either be hw.sensors.cpu%d.temp0, or
- * hw.sensors.acpitz%d.temp0 or even something different entirely within hw.sensors.%s.temp0.
- * XXX:
- * Due to the fact the i3status API only allows to set the THERMAL_ZONE parameter to an integer,
- * we can't make this fully configureable (yet?).
- */
+/* Default to acpitz(4) if no path is set. */
#define THERMAL_ZONE "acpitz%d"
-
#endif
#if defined(__FreeBSD_kernel__) && defined(__GLIBC__)
@@ -145,7 +137,7 @@ void print_ddate(yajl_gen json_gen, char *buffer, const char *format, struct tm
const char *get_ip_addr();
void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface, const char *format_up, const char *format_down);
void print_run_watch(yajl_gen json_gen, char *buffer, const char *title, const char *pidfile, const char *format);
-void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const char *path, const char *format);
+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_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);