parent
cd7aa5db00
commit
8b78ad2fe7
2 changed files with 7 additions and 3 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 */
|
||||
sw = m->ww - drawstatusbar(m, bh, stext);
|
||||
tw = m->ww - drawstatusbar(m, bh, stext);
|
||||
}
|
||||
|
||||
resizebarwin(m);
|
||||
|
|
|
@ -4,7 +4,11 @@ blue=#0000ff
|
|||
|
||||
battery() {
|
||||
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() {
|
||||
|
@ -17,6 +21,6 @@ audio() {
|
|||
}
|
||||
|
||||
while true; do
|
||||
xsetroot -name "$(battery) $(audio)"
|
||||
xsetroot -name "$(battery)"
|
||||
sleep 1
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue