diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/battery.el | 8 |
1 files changed, 8 insertions, 0 deletions
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")) |