summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar/battery
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-03-31 18:53:43 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-03-31 18:53:43 -0400
commitd21d1f1be3f3f52d05e395c5d482876cad16c235 (patch)
tree2c2cdc5f9c754ec637aed1f8eaccaa1ce544a363 /.local/bin/statusbar/battery
parent326ed6b56d71a9b689819256c9d85a2a5ece4b8f (diff)
downloadeibhear-d21d1f1be3f3f52d05e395c5d482876cad16c235.tar.gz
eibhear-d21d1f1be3f3f52d05e395c5d482876cad16c235.tar.zst
eibhear-d21d1f1be3f3f52d05e395c5d482876cad16c235.zip
break to avoid % on desktops
Diffstat (limited to '.local/bin/statusbar/battery')
-rwxr-xr-x.local/bin/statusbar/battery2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery
index 82e8450..395ad8d 100755
--- a/.local/bin/statusbar/battery
+++ b/.local/bin/statusbar/battery
@@ -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.