summaryrefslogtreecommitdiff
path: root/lisp/battery.el
diff options
context:
space:
mode:
authorRomain Francoise <romain@orebokech.com>2005-12-25 14:09:57 +0000
committerRomain Francoise <romain@orebokech.com>2005-12-25 14:09:57 +0000
commit180a4473763d5181502b287c7ec492e5fb3a3244 (patch)
treeb2588ce8e7d89f47126a05bb1bebde828f572f19 /lisp/battery.el
parent3a5050af4c3c94df335172fd80315b7599f9638c (diff)
downloademacs-180a4473763d5181502b287c7ec492e5fb3a3244.tar.gz
(battery-linux-proc-acpi): Also try
`/proc/acpi/thermal_zone/THM0/temperature'.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r--lisp/battery.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index 649cbe4c2c3..710be5a4220 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -347,6 +347,14 @@ The following %-sequences are provided:
(when (re-search-forward
"temperature: +\\([0-9]+\\) C$" nil t)
(match-string 1))))
+ (when (file-exists-p
+ "/proc/acpi/thermal_zone/THM0/temperature")
+ (with-temp-buffer
+ (insert-file-contents
+ "/proc/acpi/thermal_zone/THM0/temperature")
+ (when (re-search-forward
+ "temperature: +\\([0-9]+\\) C$" nil t)
+ (match-string 1))))
"N/A"))
(cons ?r (or (and rate (concat (number-to-string rate) " "
rate-type)) "N/A"))