break to avoid % on desktops

This commit is contained in:
Luke Smith 2020-03-31 18:53:43 -04:00
parent 326ed6b56d
commit d21d1f1be3
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -16,7 +16,7 @@ esac
for battery in /sys/class/power_supply/BAT?
do
# Get its remaining capacity and charge status.
capacity=$(cat "$battery"/capacity)
capacity=$(cat "$battery"/capacity) || break
status=$(sed "s/Discharging/🔋/;s/Not charging/🛑/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/" "$battery"/status)
# If it is discharging and 25% or less, we will add a ❗ as a warning.