Age | Commit message (Collapse) | Author |
|
|
|
On a system with multiple batteries (like thinkpads) report percentage
and time remaining only for the active battery (the one being
discharged).
Ideally we should report all batteries, but acpi only shows time remaining
for the active battery. Also callers of these functions expect a single
return value. This is still better than reporting 596% remaining (like it
did on my laptop).
For the reference, the output of acpi command with multiple batteries looks
like this:
Battery 0: Unknown, 5%
Battery 1: Discharging, 86%, 03:14:04 remaining
|
|
- Fix code style
- Fix local definitions
- Don't declare unnecessary variables
- Use `command` before grep
|
|
|
|
Co-authored-by: Michael Wolman <michael.s.wolman@gmail.com>
|
|
|
|
|
|
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
|
|
|
|
* Fix battery plugin when acpi writes to stderr
* Make stderr redirection in battery plugin more idiomatic
|
|
The $OSTYPE variable is set at ZSH compile time and can be safely used
to determine the OS of the system. e.g. darwin (os x)
|
|
|
|
Update battery plugin to show calculating - OSX
|
|
added the linux implementation to the battery plugin
|
|
plugged_in function
|
|
|
|
Instantly after removing the charger, I have found that the "AvgTimeToEmpty" value can swing to rediculous values. Apple's current claim is that the max battery life is 12 hours, so any value larger than this is considered a "time is being calculated" value.
|
|
It is especially useful for themes, this function is a port of the code written by Steve Losh
and made available on [this blog entry](http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity)
|
|
Define empty functions instead of none at all if we can't figure out the
platform.
|
|
|
|
Battery plugin updates
|
|
can be obtained even if the battery is connected.
|
|
linux battery level now refreshes after every command
|
|
|
|
|
|
|