swaybar: Only charging and discharging symbols

This commit is contained in:
Felipe M 2020-12-24 16:41:08 +01:00
parent 25c51046fa
commit f831b81380
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#!/bin/bash
# vim: ts=4
function getPowerValue() {
POWER=$(cat /sys/class/power_supply/BAT0/capacity)%
@ -9,7 +10,7 @@ function getPowerStatus() {
POWERSTATUS=$(cat /sys/class/power_supply/BAT0/status)
if [ "$POWERSTATUS" == "Charging" ]; then
echo "+"
else
elif [ "$POWERSTATUS" == "Discharging" ]; then
echo "-"
fi
}