aboutsummaryrefslogtreecommitdiff
path: root/src/print_cpu_temperature.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-20Adding glob check to cpu temperature fixes #55eplanet1-2/+14
2015-07-06Fix undeclared identifier thermal_zone errorAlexis Hildebrandt1-1/+1
when THERMAL_ZONE is not defined.
2015-06-12add apostrophe to error message to fix grammarViktor Stanchev1-1/+1
2015-03-16clang-format-3.5 -i **/*.[ch], update modelineMichael Stapelberg1-163/+162
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 Hahling1-2/+29
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 Vasarab1-18/+21
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 comparisonsMats1-1/+1
* 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 Hunsicker1-16/+17
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 Stapelberg1-4/+6
2013-10-07Add support for cpu temperature on NetBSD (using envsys(4))Arnaud Degroote1-0/+89
2013-03-20Support colored output for CPU temperature on FreeBSDBaptiste Daroussin1-0/+10
2013-03-02Fix FTBFS on HurdJakob Haufe1-1/+1
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 Stapelberg1-38/+38
2013-01-28Make sure colorful_output variable is initialized.Emil Mikulic1-3/+7
2012-11-15DragonFlyBSD support addedScott Tincman1-2/+2
2012-10-16implement max_threshold for linux, tooMichael Stapelberg1-1/+8
2012-10-16i3status - More temperature related fixes for OpenBSD, and a general featureJasper Lievisse Adriaanse1-9/+17
- 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 Adriaanse1-4/+5
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 Stapelberg1-0/+1
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 Stapelberg1-1/+1
2012-05-04Handle %d with non-default CPU temperature path.Ewgenij Starostin1-3/+4
2012-04-30Implement basic fetching of cpu temperature on OpenBSD.Jasper Lievisse Adriaanse1-1/+45
2012-04-08add yajl compat codeMichael Stapelberg1-0/+1
2012-03-25Properly output JSON with libyajlMichael Stapelberg1-10/+9
2012-02-16Implement the i3bar JSON protocolMichael Stapelberg1-0/+7
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 Smith1-5/+6
2011-07-24only compile print_cpu_temperature if THERMAL_ZONE is availableMichael Stapelberg1-0/+2
Fixes FTBFS on hurd-i386
2011-01-06implement the 'path' option for cpu temperatureMichael Stapelberg1-5/+8
2009-10-11Breaks configfiles! Major refactoring of i3status, see belowMichael Stapelberg1-0/+59
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.