aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/battery.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index f4d59f30bbb..45334163fa6 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -651,7 +651,7 @@ Last Full Charge \\([[:digit:]]+\\)")
651 ((not (zerop (logand state 2))) 'charging) 651 ((not (zerop (logand state 2))) 'charging)
652 ((not (zerop (logand state 1))) 'discharging) 652 ((not (zerop (logand state 1))) 'discharging)
653 ((not (zerop (logand state 4))) 'critical) 653 ((not (zerop (logand state 4))) 'critical)
654 (t 'normal)) 654 (t 'fully-charged))
655 :design-capacity design-capacity 655 :design-capacity design-capacity
656 :design-voltage design-voltage 656 :design-voltage design-voltage
657 :last-full-charge last-full-charge))) 657 :last-full-charge last-full-charge)))
@@ -663,6 +663,7 @@ This function only works on Haiku systems with an ACPI battery.
663The following %-sequences are provided: 663The following %-sequences are provided:
664%c Current capacity (mAh) 664%c Current capacity (mAh)
665%r Current rate of charge or discharge 665%r Current rate of charge or discharge
666%L AC line status (verbose)
666%B Battery status (verbose) 667%B Battery status (verbose)
667%b Battery status: empty means high, `-' means low, 668%b Battery status: empty means high, `-' means low,
668 `!' means critical, and `+' means charging 669 `!' means critical, and `+' means charging
@@ -688,6 +689,8 @@ The following %-sequences are provided:
688 "-") 689 "-")
689 ((eq state 'critical) "!") 690 ((eq state 'critical) "!")
690 (t "")))) 691 (t ""))))
692 (cons ?L (if (not (eq (plist-get list :state) 'discharging))
693 "on-line" "off-line"))
691 (cons ?p (format "%.0f" 694 (cons ?p (format "%.0f"
692 (* 100 (/ (plist-get list :capacity) 695 (* 100 (/ (plist-get list :capacity)
693 (plist-get list :last-full-charge)))))) 696 (plist-get list :last-full-charge))))))