From 1463b8f33657e0af72b203b9bccb09669cd12d64 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 26 Mar 2016 00:24:18 +1100 Subject: [PATCH] Rename battery_status to battery_state --- neofetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index dcb2731c..b632efd3 100755 --- a/neofetch +++ b/neofetch @@ -1555,7 +1555,7 @@ getbattery () { esac batteries=($(cat /sys/class/power_supply/BAT${battery_num}/capacity)) - battery_status=($(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. title="$subtitle" @@ -1594,7 +1594,7 @@ getbattery () { case "$distro" in "FreeBSD"*) battery=$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}') - battery_status=$(acpiconf -i 0 | awk -F ':\t\t\t' '/State/ {print $2}') + battery_state=$(acpiconf -i 0 | awk -F ':\t\t\t' '/State/ {print $2}') ;; "NetBSD"*) @@ -1616,7 +1616,7 @@ getbattery () { "Mac OS X") battery="$(pmset -g batt | grep -o '[0-9]*%')" - battery_status="$(pmset -g batt | awk 'NR==2 {print $3}')" + battery_state="$(pmset -g batt | awk 'NR==2 {print $3}')" ;; "Windows") @@ -1628,7 +1628,7 @@ getbattery () { ;; esac - case "$battery_status" in + case "$battery_state" in *"charging"*) battery+=" Charging" ;; esac