HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f80a56a
)
(battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THR2/temperature'.
author
Juri Linkov
<juri@jurta.org>
Tue, 9 May 2006 22:43:35 +0000
(22:43 +0000)
committer
Juri Linkov
<juri@jurta.org>
Tue, 9 May 2006 22:43:35 +0000
(22:43 +0000)
lisp/battery.el
patch
|
blob
|
blame
|
history
diff --git
a/lisp/battery.el
b/lisp/battery.el
index
34f74aa
..
50edc8d
100644
(file)
--- a/
lisp/battery.el
+++ b/
lisp/battery.el
@@
-386,6
+386,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/THR2/temperature")
+ (with-temp-buffer
+ (insert-file-contents
+ "/proc/acpi/thermal_zone/THR2/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"))