From a919ad89c8da9006288a58049da55374e36147fd Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Mon, 11 Sep 2023 17:06:03 +0400 Subject: [PATCH] bar --- config/dwmbar/bar.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/dwmbar/bar.sh b/config/dwmbar/bar.sh index 2b261502..aa792ca0 100755 --- a/config/dwmbar/bar.sh +++ b/config/dwmbar/bar.sh @@ -16,12 +16,13 @@ cpu() { } battery() { - get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)" - get_status="$(cat /sys/class/power_supply/BAT1/status)" + get_capacity="$(cat /sys/class/power_supply/BAT*/capacity)" + get_status="$(cat /sys/class/power_supply/BAT*/status)" case "$get_status" in Charging) printf "^c$blue^ 󰂄 $get_capacity" ;; Discharging) if (( $get_capacity <= 20)); then - printf "^c$lightred^ 󰂃 $get_capacity" + printf "^c$white^ ^b$lightred^ 󰂃" + printf "^c$white^ ^b$black^ $get_capacity" else printf "^c$white^ ^b$blue 󰁹" printf "^c$white^ ^b$black^ $get_capacity"