bar
This commit is contained in:
parent
f66f96b1f3
commit
a919ad89c8
1 changed files with 4 additions and 3 deletions
|
@ -16,12 +16,13 @@ cpu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
battery() {
|
battery() {
|
||||||
get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)"
|
get_capacity="$(cat /sys/class/power_supply/BAT*/capacity)"
|
||||||
get_status="$(cat /sys/class/power_supply/BAT1/status)"
|
get_status="$(cat /sys/class/power_supply/BAT*/status)"
|
||||||
case "$get_status" in
|
case "$get_status" in
|
||||||
Charging) printf "^c$blue^ $get_capacity" ;;
|
Charging) printf "^c$blue^ $get_capacity" ;;
|
||||||
Discharging) if (( $get_capacity <= 20)); then
|
Discharging) if (( $get_capacity <= 20)); then
|
||||||
printf "^c$lightred^ $get_capacity"
|
printf "^c$white^ ^b$lightred^ "
|
||||||
|
printf "^c$white^ ^b$black^ $get_capacity"
|
||||||
else
|
else
|
||||||
printf "^c$white^ ^b$blue "
|
printf "^c$white^ ^b$blue "
|
||||||
printf "^c$white^ ^b$black^ $get_capacity"
|
printf "^c$white^ ^b$black^ $get_capacity"
|
||||||
|
|
Loading…
Reference in a new issue