Fix _lp_battery return value when LP_ENABLE_BATT != 1
This commit is contained in:
parent
fe6d9f3ebe
commit
b3ca6fcdaa
@ -1014,7 +1014,7 @@ _lp_bzr_branch_color()
|
|||||||
# returns 4 if no battery support
|
# returns 4 if no battery support
|
||||||
_lp_battery()
|
_lp_battery()
|
||||||
{
|
{
|
||||||
[[ "$LP_ENABLE_BATT" != 1 ]] && return
|
[[ "$LP_ENABLE_BATT" != 1 ]] && return 4
|
||||||
local acpi
|
local acpi
|
||||||
acpi="$(acpi --battery 2>/dev/null)"
|
acpi="$(acpi --battery 2>/dev/null)"
|
||||||
# Extract the battery load value in percent
|
# Extract the battery load value in percent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user