some updates.
This commit is contained in:
parent
41121c4a24
commit
e8d562914b
1 changed files with 15 additions and 9 deletions
|
@ -5,21 +5,27 @@
|
||||||
|
|
||||||
. /tmp/wms_var
|
. /tmp/wms_var
|
||||||
|
|
||||||
FREQ=0.5 # freq
|
# freq.
|
||||||
COLORS="aa0000 $AC" # alternate colors
|
FREQ=0.5
|
||||||
|
# alternate colors.
|
||||||
|
COLORS="aa0000 $AC"
|
||||||
|
|
||||||
while :; do
|
while true:; do
|
||||||
read -r STATUS < /sys/class/power_supply/BAT0/status # battery status
|
# battery status.
|
||||||
if [ "$STATUS" = "Discharging" ]; then # if status discharging
|
read -r STATUS < /sys/class/power_supply/BAT0/status
|
||||||
for c in $COLORS; do # alternate border colors
|
# if status discharging.
|
||||||
|
if [ "$STATUS" = "Discharging" ]; then
|
||||||
|
# alternate border colors.
|
||||||
|
for c in $COLORS; do
|
||||||
chwb -c $c $(pfw)
|
chwb -c $c $(pfw)
|
||||||
sleep $FREQ
|
sleep $FREQ
|
||||||
done
|
done
|
||||||
|
|
||||||
else # if not
|
else # if not
|
||||||
chwb -c $AC $(pfw) # default border colors
|
# default border colors.
|
||||||
break # exit loop
|
chwb -c $AC $(pfw)
|
||||||
|
# exit loop.
|
||||||
|
break
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue