Changeset 4058 for trunk/lisp/battery.el
- Timestamp:
- 04/16/06 21:46:31 (3 years ago)
- Files:
-
- trunk/lisp/battery.el (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/battery.el
r4037 r4058 78 78 conversion specifications introduced by a `%' character in the control 79 79 string are substituted as defined by the current value of the variable 80 `battery-status-function'." 80 `battery-status-function'. Here are the ones generally available: 81 %c Current capacity (mAh or mWh) 82 %r Current rate of charge or discharge 83 %B Battery status (verbose) 84 %b Battery status: empty means high, `-' means low, 85 `!' means critical, and `+' means charging 86 %d Temperature (in degrees Celsius) 87 %L AC line status (verbose) 88 %p Battery load percentage 89 %m Remaining time (to charge or discharge) in minutes 90 %h Remaining time (to charge or discharge) in hours 91 %t Remaining time (to charge or discharge) in the form `h:min'" 81 92 :type '(choice string (const nil)) 82 93 :group 'battery) … … 97 108 conversion specifications introduced by a `%' character in the control 98 109 string are substituted as defined by the current value of the variable 99 `battery-status-function'." 110 `battery-status-function'. Here are the ones generally available: 111 %c Current capacity (mAh or mWh) 112 %r Current rate of charge or discharge 113 %B Battery status (verbose) 114 %b Battery status: empty means high, `-' means low, 115 `!' means critical, and `+' means charging 116 %d Temperature (in degrees Celsius) 117 %L AC line status (verbose) 118 %p Battery load percentage 119 %m Remaining time (to charge or discharge) in minutes 120 %h Remaining time (to charge or discharge) in hours 121 %t Remaining time (to charge or discharge) in the form `h:min'" 100 122 :type '(choice string (const nil)) 101 123 :group 'battery) … … 197 219 `!' means critical, and `+' means charging 198 220 %p Battery load percentage 199 %s Remaining time in seconds200 %m Remaining time in minutes201 %h Remaining time in hours202 %t Remaining time in the form `h:min'"221 %s Remaining time (to charge or discharge) in seconds 222 %m Remaining time (to charge or discharge) in minutes 223 %h Remaining time (to charge or discharge) in hours 224 %t Remaining time (to charge or discharge) in the form `h:min'" 203 225 (let (driver-version bios-version bios-interface line-status 204 226 battery-status battery-status-symbol load-percentage … … 268 290 %L AC line status (verbose) 269 291 %p Battery load percentage 270 %m Remaining time in minutes271 %h Remaining time in hours272 %t Remaining time in the form `h:min'"292 %m Remaining time (to charge or discharge) in minutes 293 %h Remaining time (to charge or discharge) in hours 294 %t Remaining time (to charge or discharge) in the form `h:min'" 273 295 (let ((design-capacity 0) 274 296 (last-full-capacity 0) … … 288 310 (when (re-search-forward "present: +yes$" nil t) 289 311 (and (re-search-forward "charging state: +\\(.*\\)$" nil t) 290 (member charging-state '("unknown" nil))312 (member charging-state '("unknown" "charged" nil)) 291 313 ;; On most multi-battery systems, most of the time only one 292 314 ;; battery is "charging"/"discharging", the others are … … 370 392 (cons ?B (or charging-state "N/A")) 371 393 (cons ?b (or (and (string= charging-state "charging") "+") 372 (and (< capacity low) "!")373 (and (< capacity warn) "-")394 (and capacity (< capacity low) "!") 395 (and capacity (< capacity warn) "-") 374 396 "")) 375 397 (cons ?h (or (and hours (number-to-string hours)) "N/A"))
