mirror of
https://github.com/dylanaraps/neofetch.git
synced 2026-01-06 07:04:03 +00:00
Fix missing battery bug
This commit is contained in:
4
neofetch
4
neofetch
@@ -1688,8 +1688,8 @@ getbattery() {
|
|||||||
*) index="$battery_num" ;;
|
*) index="$battery_num" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
batteries=($(cat "/sys/class/power_supply/BAT$battery_num/capacity"))
|
batteries=("$(cat /sys/class/power_supply/BAT$battery_num/capacity)")
|
||||||
battery_state=($(cat "/sys/class/power_supply/BAT${battery_num}/status"))
|
battery_state=("$(cat /sys/class/power_supply/BAT${battery_num}/status)")
|
||||||
|
|
||||||
# Get the subtitle and reassign it so it doesn't change.
|
# Get the subtitle and reassign it so it doesn't change.
|
||||||
title="$subtitle"
|
title="$subtitle"
|
||||||
|
|||||||
Reference in New Issue
Block a user