Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
923 B

#! /bin/sh
bat=$(cat /sys/class/power_supply/BAT0/capacity)
status=$(cat /sys/class/power_supply/BAT0/status)
ramp10=
ramp20=
ramp30=
ramp40=
ramp50=
ramp60=
ramp70=
ramp80=
ramp90=
ramp100=
if [[ $bat -lt 10 ]]; then
echo "^c#ebcb8b^$ramp10^d^ $bat% "
elif [[ $bat -lt 20 ]]; then
echo "^c#ebcb8b^$ramp20^d^ $bat% "
elif [[ $bat -lt "30" ]]; then
echo "^c#ebcb8b^$ramp30^d^ $bat% "
elif [[ $bat -lt "40" ]]; then
echo "^c#ebcb8b^$ramp40^d^ $bat% "
elif [[ $bat -lt "50" ]]; then
echo "^c#ebcb8b^$ramp50^d^ $bat% "
elif [[ $bat -lt "60" ]]; then
echo "^c#ebcb8b^$ramp60^d^ $bat% "
elif [[ $bat -lt "70" ]]; then
echo "^c#ebcb8b^$ramp70^d^ $bat% "
elif [[ $bat -lt "80" ]]; then
echo "^c#ebcb8b^$ramp80^d^ $bat% "
elif [[ $bat -lt "90" ]]; then
echo "^c#ebcb8b^$ramp90^d^ $bat% "
elif [[ $bat -le "100" ]]; then
echo "^c#ebcb8b^$ramp100^d^ $bat% "
fi