swaybar: Only charging and discharging symbols
This commit is contained in:
parent
25c51046fa
commit
f831b81380
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# vim: ts=4
|
||||||
|
|
||||||
function getPowerValue() {
|
function getPowerValue() {
|
||||||
POWER=$(cat /sys/class/power_supply/BAT0/capacity)%
|
POWER=$(cat /sys/class/power_supply/BAT0/capacity)%
|
||||||
|
@ -9,7 +10,7 @@ function getPowerStatus() {
|
||||||
POWERSTATUS=$(cat /sys/class/power_supply/BAT0/status)
|
POWERSTATUS=$(cat /sys/class/power_supply/BAT0/status)
|
||||||
if [ "$POWERSTATUS" == "Charging" ]; then
|
if [ "$POWERSTATUS" == "Charging" ]; then
|
||||||
echo "+"
|
echo "+"
|
||||||
else
|
elif [ "$POWERSTATUS" == "Discharging" ]; then
|
||||||
echo "-"
|
echo "-"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue