swaybar: Only charging and discharging symbols
This commit is contained in:
parent
25c51046fa
commit
f831b81380
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue