~sorsha


#243 No battery level in status bar on Nexus 5 1 year, 6 months ago

Comment by ~sorsha on ~mil/sxmo-tickets

Hi,

This bug still persists on my PinePhone.

BATTERY_DEVICE="${BATTERY_DEVICE:-"/sys/class/power_supply/*-battery"}"
PCT="$(cat "$BATTERY_DEVICE"/capacity)"
cat: '/sys/class/power_supply/*-battery/capacity': No such file or directory

This works for me:

BATTERY_DEVICE="$(eval echo /sys/class/power_supply/*-battery)"

BR