diff --git a/debian/changelog b/debian/changelog index 3ee9d976..ca7cfa44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/usr/lib/byobu/battery b/usr/lib/byobu/battery index f52da27c..9efca58b 100755 --- a/usr/lib/byobu/battery +++ b/usr/lib/byobu/battery @@ -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