mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Fix sysfs battery display.
* battery.el (battery-echo-area-format): Display remaining time for sysfs backend too (Bug#11269). (battery-linux-sysfs): Fix conditional for the charge.
This commit is contained in:
parent
8912063b46
commit
540710130b
2 changed files with 8 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ introduced by a `%' character in a control string."
|
|||
(cond ((eq battery-status-function 'battery-linux-proc-acpi)
|
||||
"Power %L, battery %B at %r (%p%% load, remaining time %t)")
|
||||
((eq battery-status-function 'battery-linux-sysfs)
|
||||
"Power %L, battery %B (%p%% load)")
|
||||
"Power %L, battery %B (%p%% load, remaining time %t)")
|
||||
((eq battery-status-function 'battery-pmset)
|
||||
"%L power, battery %B (%p%% load, remaining time %t)")
|
||||
((eq battery-status-function 'battery-yeeloong-sysfs)
|
||||
|
|
@ -509,7 +509,7 @@ The following %-sequences are provided:
|
|||
"N/A"))
|
||||
(cons ?d (or temperature "N/A"))
|
||||
(cons ?B (or charging-state "N/A"))
|
||||
(cons ?p (cond ((> charge-full 0)
|
||||
(cons ?p (cond ((and (> charge-full 0) (> charge-now 0))
|
||||
(format "%.1f"
|
||||
(/ (* 100 charge-now) charge-full)))
|
||||
((> energy-full 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue