fix statusbar
This commit is contained in:
parent
6040e3daa5
commit
cd7aa5db00
2 changed files with 3 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue