Simplify battery status check
This commit is contained in:
parent
74170330cd
commit
3ef4cf45a8
1 changed files with 2 additions and 2 deletions
|
|
@ -18,8 +18,8 @@ elif [ "${audio_mute}" = "no" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
battery=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/capacity)
|
battery=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||||
battery_state=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/status)
|
battery_state=$(cat /sys/class/power_supply/BAT0/status)
|
||||||
battery_symbol="❔"
|
battery_symbol="❔"
|
||||||
if [ "${battery_state}" = "Charging" ]; then
|
if [ "${battery_state}" = "Charging" ]; then
|
||||||
battery_symbol="🗲"
|
battery_symbol="🗲"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue