Mercurial > emacs
comparison lisp/battery.el @ 67802:91c501f75eea
(battery-linux-proc-acpi): Also try
`/proc/acpi/thermal_zone/THM0/temperature'.
author | Romain Francoise <romain@orebokech.com> |
---|---|
date | Sun, 25 Dec 2005 14:09:57 +0000 |
parents | 08b55dc9bcd1 |
children | 0d67eef96242 7beb78bc1f8e |
comparison
equal
deleted
inserted
replaced
67801:66142acef663 | 67802:91c501f75eea |
---|---|
345 (insert-file-contents | 345 (insert-file-contents |
346 "/proc/acpi/thermal_zone/THM/temperature") | 346 "/proc/acpi/thermal_zone/THM/temperature") |
347 (when (re-search-forward | 347 (when (re-search-forward |
348 "temperature: +\\([0-9]+\\) C$" nil t) | 348 "temperature: +\\([0-9]+\\) C$" nil t) |
349 (match-string 1)))) | 349 (match-string 1)))) |
350 (when (file-exists-p | |
351 "/proc/acpi/thermal_zone/THM0/temperature") | |
352 (with-temp-buffer | |
353 (insert-file-contents | |
354 "/proc/acpi/thermal_zone/THM0/temperature") | |
355 (when (re-search-forward | |
356 "temperature: +\\([0-9]+\\) C$" nil t) | |
357 (match-string 1)))) | |
350 "N/A")) | 358 "N/A")) |
351 (cons ?r (or (and rate (concat (number-to-string rate) " " | 359 (cons ?r (or (and rate (concat (number-to-string rate) " " |
352 rate-type)) "N/A")) | 360 rate-type)) "N/A")) |
353 (cons ?B (or charging-state "N/A")) | 361 (cons ?B (or charging-state "N/A")) |
354 (cons ?b (or (and (string= charging-state "charging") "+") | 362 (cons ?b (or (and (string= charging-state "charging") "+") |