Wileyfox Swift battery level icon fix
Signed-off-by: Anjandev Momi <anjan@momi.ca>
This commit is contained in:
parent
51815acb0a
commit
b2fad74052
2 changed files with 6 additions and 3 deletions
|
@ -54,10 +54,10 @@ update() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Battery pct
|
# 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="$(
|
BATSTATUS="$(
|
||||||
cat /sys/class/power_supply/*-battery/status |
|
cut -c1 "$BATTERY_DEVICE"/status
|
||||||
cut -c1
|
|
||||||
)"
|
)"
|
||||||
if [ "$BATSTATUS" = "C" ]; then
|
if [ "$BATSTATUS" = "C" ]; then
|
||||||
if [ "$PCT" -lt 20 ]; then
|
if [ "$PCT" -lt 20 ]; then
|
||||||
|
|
3
scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh
Normal file
3
scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export BATTERY_DEVICE="/sys/class/power_supply/pm8916-bms-vm"
|
Loading…
Add table
Add a link
Reference in a new issue