From 9b46a12cd5b6585885c50cb22d98be497c2388f5 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 9 May 2006 22:43:35 +0000 Subject: [PATCH] (battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THR2/temperature'. --- lisp/battery.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/battery.el b/lisp/battery.el index 34f74aa9932..50edc8dde8a 100644 --- 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")) -- 2.39.5