diff --git a/scripts/core/sxmo_statusbar.sh b/scripts/core/sxmo_statusbar.sh index ae62a9d..eb9cfec 100755 --- a/scripts/core/sxmo_statusbar.sh +++ b/scripts/core/sxmo_statusbar.sh @@ -54,10 +54,10 @@ update() { fi # Battery pct - PCT="$(cat /sys/class/power_supply/*-battery/capacity)" + BATTERY_DEVICE="${BATTERY_DEVICE:-"/sys/class/power_supply/*-battery"}" + PCT="$(cat "$BATTERY_DEVICE"/capacity)" BATSTATUS="$( - cat /sys/class/power_supply/*-battery/status | - cut -c1 + cut -c1 "$BATTERY_DEVICE"/status )" if [ "$BATSTATUS" = "C" ]; then if [ "$PCT" -lt 20 ]; then diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh b/scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh new file mode 100644 index 0000000..12ed601 --- /dev/null +++ b/scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +export BATTERY_DEVICE="/sys/class/power_supply/pm8916-bms-vm"