Revert "fix statusbar"

This reverts commit cd7aa5db00.
This commit is contained in:
Sakooooo 2023-09-12 11:00:02 +04:00
parent cd7aa5db00
commit 8b78ad2fe7
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 7 additions and 3 deletions

View file

@ -954,7 +954,7 @@ drawbar(Monitor *m)
/* draw status first so it can be overdrawn by tags later */ /* draw status first so it can be overdrawn by tags later */
if (m == selmon) { /* status is only drawn on selected monitor */ if (m == selmon) { /* status is only drawn on selected monitor */
sw = m->ww - drawstatusbar(m, bh, stext); tw = m->ww - drawstatusbar(m, bh, stext);
} }
resizebarwin(m); resizebarwin(m);

View file

@ -4,7 +4,11 @@ blue=#0000ff
battery() { battery() {
get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)" get_capacity="$(cat /sys/class/power_supply/BAT1/capacity)"
printf "$get_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
} }
audio() { audio() {
@ -17,6 +21,6 @@ audio() {
} }
while true; do while true; do
xsetroot -name "$(battery) $(audio)" xsetroot -name "$(battery)"
sleep 1 sleep 1
done done