mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
Merge pull request #815 from deadda7a/battery-fix
fixed get_battery for device names starting with CMB
This commit is contained in:
2
neofetch
2
neofetch
@@ -2077,7 +2077,7 @@ get_battery() {
|
||||
"Linux")
|
||||
# We use 'prin' here so that we can do multi battery support
|
||||
# with a single battery per line.
|
||||
for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge}*; do
|
||||
for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge,CMB}*; do
|
||||
capacity="$(< "${bat}/capacity")"
|
||||
status="$(< "${bat}/status")"
|
||||
|
||||
|
Reference in New Issue
Block a user