* usr/lib/byobu/battery: LP: #1090831

- some batteries use "CHARGE" while others use "ENERGY"
This commit is contained in:
Dustin Kirkland 2013-01-08 14:29:15 -06:00
commit e61b7c9629
2 changed files with 9 additions and 2 deletions

4
debian/changelog vendored
View file

@ -19,6 +19,10 @@ byobu (5.23) unreleased; urgency=low
- point to the new byobu.co website rather than the launchpad landing
page
[ Dustin Kirkland and Philip Muškovac ]
* usr/lib/byobu/battery: LP: #1090831
- some batteries use "CHARGE" while others use "ENERGY"
[ Antonio Lorusso ]
* usr/bin/byobu-status: LP: #1018538, #1073145
- fix select/copy/paste in iTerm2 and KDE

View file

@ -38,8 +38,11 @@ __battery() {
if [ -r "$bat/uevent" ]; then
. "$bat/uevent"
present="$POWER_SUPPLY_PRESENT"
full="$POWER_SUPPLY_CHARGE_FULL"
rem="$POWER_SUPPLY_CHARGE_NOW"
# Some use "CHARGE", others use "ENERGY"
[ -n "$POWER_SUPPLY_CHARGE_FULL" ] && full="$POWER_SUPPLY_CHARGE_FULL"
[ -n "$POWER_SUPPLY_ENERGY_FULL" ] && full="$POWER_SUPPLY_ENERGY_FULL"
[ -n "$POWER_SUPPLY_CHARGE_NOW" ] && rem="$POWER_SUPPLY_CHARGE_NOW"
[ -n "$POWER_SUPPLY_ENERGY_NOW" ] && rem="$POWER_SUPPLY_ENERGY_NOW"
state="$POWER_SUPPLY_STATUS"
[ "$present" = "1" ] && [ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break
fi