From cd7aa5db00dc90773eaab0f9870103fdf6fd8577 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:58:28 +0400 Subject: [PATCH] fix statusbar --- config/dwm/dwm.c | 2 +- config/dwmbar/bar.sh | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/config/dwm/dwm.c b/config/dwm/dwm.c index 380815a5..de7b8996 100644 --- a/config/dwm/dwm.c +++ b/config/dwm/dwm.c @@ -954,7 +954,7 @@ drawbar(Monitor *m) /* draw status first so it can be overdrawn by tags later */ if (m == selmon) { /* status is only drawn on selected monitor */ - tw = m->ww - drawstatusbar(m, bh, stext); + sw = m->ww - drawstatusbar(m, bh, stext); } resizebarwin(m); diff --git a/config/dwmbar/bar.sh b/config/dwmbar/bar.sh index 4641dbfb..a7a0bc60 100755 --- a/config/dwmbar/bar.sh +++ b/config/dwmbar/bar.sh @@ -4,11 +4,7 @@ blue=#0000ff battery() { get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)" - get_status="$(cat /sys/class/power_supply/BAT1/status)" - case "$get_status" in - Charging) printf "^c$blue^ 󰂄 $get_capacity" ;; - Discharging) printf "^b$blue 󰁹 $get_capacity" ;; - esac + printf "$get_capacity" } audio() { @@ -21,6 +17,6 @@ audio() { } while true; do - xsetroot -name "$(battery)" + xsetroot -name "$(battery) $(audio)" sleep 1 done