27 lines
1.3 KiB
Plaintext
27 lines
1.3 KiB
Plaintext
$OpenBSD: patch-i3status_c,v 1.2 2012/10/16 10:40:21 jasper Exp $
|
|
|
|
From ae4873bac793245e7dea4719c8e0d1c7bc990d5f Mon Sep 17 00:00:00 2001
|
|
From: Jasper Lievisse Adriaanse <jasper@openbsd.org>
|
|
Date: Wed, 10 Oct 2012 07:57:32 +0000
|
|
Subject: i3status - More temperature related fixes for OpenBSD, and a general feature
|
|
|
|
--- i3status.c.orig Tue Oct 9 20:35:06 2012
|
|
+++ i3status.c Tue Oct 9 20:35:15 2012
|
|
@@ -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;
|
|
}
|
|
|