This commit is contained in:
sawebb19 2022-12-28 16:44:03 -05:00
commit 6e5095f3cf
35 changed files with 453 additions and 0 deletions

27
dwm/charge.sh Executable file
View file

@ -0,0 +1,27 @@
#!/bin/sh
level=$(cat /sys/class/power_supply/BAT0/capacity)
stats=$(cat /sys/class/power_supply/BAT0/status)
dicon=(            )
uicon=(            )
if [ $stats == "Charging" ]; then
icon=${uicon[$(( level / 10 ))]}
else
icon=${dicon[$(( level / 10 ))]}
fi
if [ $level -ge 0 ]; then
color="^c#F75341^"
fi
if [ $level -ge 20 ]; then
color="^c#FED06E^"
fi
if [ $level -ge 50 ]; then
color="^c#98DC37^"
fi
echo "${color}${icon} ${level}%"