some updates.

This commit is contained in:
#root_informatica 2024-02-16 00:10:35 -03:00
parent 41121c4a24
commit e8d562914b

View file

@ -5,21 +5,27 @@
. /tmp/wms_var
FREQ=0.5 # freq
COLORS="aa0000 $AC" # alternate colors
# freq.
FREQ=0.5
# alternate colors.
COLORS="aa0000 $AC"
while :; do
read -r STATUS < /sys/class/power_supply/BAT0/status # battery status
if [ "$STATUS" = "Discharging" ]; then # if status discharging
for c in $COLORS; do # alternate border colors
while true:; do
# battery status.
read -r STATUS < /sys/class/power_supply/BAT0/status
# if status discharging.
if [ "$STATUS" = "Discharging" ]; then
# alternate border colors.
for c in $COLORS; do
chwb -c $c $(pfw)
sleep $FREQ
done
else # if not
chwb -c $AC $(pfw) # default border colors
break # exit loop
# default border colors.
chwb -c $AC $(pfw)
# exit loop.
break
fi
done