redo bar
This commit is contained in:
parent
deea5de924
commit
01cd34c02d
1 changed files with 14 additions and 0 deletions
14
config/dwmbar/bar.sh
Normal file
14
config/dwmbar/bar.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
battery() {
|
||||||
|
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) printf "^c$white^ ^b$blue $get_capacity"
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
sleep 1 && xsetroot -name "$(battery)"
|
||||||
|
done
|
Loading…
Reference in a new issue