summaryrefslogtreecommitdiff
path: root/src/print_cpu_temperature.c
AgeCommit message (Collapse)Author
2018-04-06Fix NULL value on OpenBSD when there is no acpitz0Florian Anderiasch
Using %degrees on OpenBSD resulted in garbage values if sysctl doesn't know about any cpu temperature sensors.
2017-02-01Fix the deciKelvin to Celsius conversion on FreeBSD (#195)Baptiste Daroussin
Change from ceiled value to floored value to be consistent with the FreeBSD kernel https://svnweb.freebsd.org/base?view=revision&revision=300421
2016-11-15Add 'format_below_threshold' option for 'disk' moduleMihai Coman
Add 'format_above_threshold' option for 'cpu_temperature' module Add 'format_above_threshold' option for 'cpu_usage' module Add 'format_above_threshold' option for 'load' module
2016-03-20Adding glob check to cpu temperature fixes #55eplanet
2015-07-06Fix undeclared identifier thermal_zone errorAlexis Hildebrandt
when THERMAL_ZONE is not defined.
2015-06-12add apostrophe to error message to fix grammarViktor Stanchev
2015-03-16clang-format-3.5 -i **/*.[ch], update modelineMichael Stapelberg
From here on, we’ll use clang-format to automatically format the source. This has worked well in i3, so we are introducing it for i3status.
2014-08-08Fix Dragonfly BSD CPU temperature gaugeRobin Hahling
This patch fixes CPU temperature gauge for DragonFly BSD. Commit 0eeded8 assumed that fetching CPU temperature for DragonFly BSD was similar to that of FreeBSD but this assumption is false.
2014-04-30Fix NetBSD CPU temp gauge bugAlexander Vasarab
This patch fixes a bug in which multiple (conflicting) CPU temps may be included in the output for the "cpu temperature" module. The bug is due to the way that the code parsed the envsys(4)-returned data, and would manifest itself on x86-based NetBSD machines, since those use cputemp(4) as well as acpitz(4), thereby creating multiple envsys(4) entries with identical descriptions but which refer to different physical sensors. Instead of matching the description attribute of each device returned by envsys(4) against the target format, this patch throws away non-matching keys in the first instruction inside the dict walk. This has the benefit of sparing unnecessary CPU cycles, and preventing other sensors from being included erroneously. Additionally, the THERMAL_ZONE format is now joined with OpenBSD in that it uses acpitz(4) explicitly. This is prefered since it is much older (dating back to NetBSD 2.0), and does not exclude x86-based users (as with cputemp(4)).
2014-03-12Unify use of string comparisonsMats
* strncmp(s1, s2, strlen(s2)) → BEGINS_WITH(s1, s2) * strncmp(s1, s2, strlen(s1)) → strcmp(s1, s2) * Prefer case-insensitive comparison for options
2014-02-26i3status: Bugfix: Reading multiple temperature sensors not possibleMarco Hunsicker
This patch inlines the creation of the thermal zone string in order to force computation on each invocation. This is necessary to be able to read the values of several temperature sensors.
2013-10-24print_cpu_temperature: fix memory leak (Thanks kuba)Michael Stapelberg
2013-10-07Add support for cpu temperature on NetBSD (using envsys(4))Arnaud Degroote
2013-03-20Support colored output for CPU temperature on FreeBSDBaptiste Daroussin
2013-03-02Fix FTBFS on HurdJakob Haufe
On GNU/Hurd, THERMAL_ZONE is undefined. This makes compilation fail as outwalk is declared inside of #ifdef THERMAL_ZONE, but it's used outside of it (by OUTPUT_FULL_TEXT). This moves the declaration outside the #ifdef to allow for successful compilation on Hurd again.
2013-01-28retab! print_cpu_temperatureMichael Stapelberg
2013-01-28Make sure colorful_output variable is initialized.Emil Mikulic
2012-11-15DragonFlyBSD support addedScott Tincman
2012-10-16implement max_threshold for linux, tooMichael Stapelberg
2012-10-16i3status - More temperature related fixes for OpenBSD, and a general featureJasper Lievisse Adriaanse
- 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.
2012-10-16i3status - Default to acpitz(4) instead of cpu(4) for OpenBSD temperature ↵Jasper Lievisse Adriaanse
readings The acpitz(4) values are eventually used by the kernel to determine if the machine is getting too hot.
2012-05-09Error handling: Never output null as full_text (JSON), prefix messages with ↵Michael Stapelberg
i3status (Thanks Artemis) The former made i3bar crash, the latter is helpful for debugging.
2012-05-09Improve error message when the cpu temperature cannot be readMichael Stapelberg
2012-05-04Handle %d with non-default CPU temperature path.Ewgenij Starostin
2012-04-30Implement basic fetching of cpu temperature on OpenBSD.Jasper Lievisse Adriaanse
2012-04-08add yajl compat codeMichael Stapelberg
2012-03-25Properly output JSON with libyajlMichael Stapelberg
2012-02-16Implement the i3bar JSON protocolMichael Stapelberg
This hardcodes all the JSON parts. Strings are not properly escaped currently. The best/easiest way to fix this is by actually using libyajl.
2011-08-25make modules more resilient to failureConnor Lane Smith
2011-07-24only compile print_cpu_temperature if THERMAL_ZONE is availableMichael Stapelberg
Fixes FTBFS on hurd-i386
2011-01-06implement the 'path' option for cpu temperatureMichael Stapelberg
2009-10-11Breaks configfiles! Major refactoring of i3status, see belowMichael Stapelberg
We finally switched to libconfuse for a configuration file format which does not require much work for the programmer nor for the user. Plus, it avoids the Not-Invented-Here syndrome of yet another config file format. Furthermore, as a consequence of providing format strings for every "module" (ipv6, wireless, …), we directly print the output and thus we needed to drop support for wmii. This allowed us to get rid of quite some complexity. Documentation about the new configuration file and options will follow. This commit is the beginning of what will be i3status v2.0.