Fix _lp_battery return value when LP_ENABLE_BATT != 1

This commit is contained in:
Olivier Mengué 2013-05-12 23:14:06 +02:00
parent fe6d9f3ebe
commit b3ca6fcdaa

View File

@ -1014,7 +1014,7 @@ _lp_bzr_branch_color()
# returns 4 if no battery support
_lp_battery()
{
[[ "$LP_ENABLE_BATT" != 1 ]] && return
[[ "$LP_ENABLE_BATT" != 1 ]] && return 4
local acpi
acpi="$(acpi --battery 2>/dev/null)"
# Extract the battery load value in percent