Added Statusbad Commands (Not in correct location)
This commit is contained in:
25
statusbar/dwm_battery
Executable file
25
statusbar/dwm_battery
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
bat_capacity=$(</sys/class/power_supply/BAT0/capacity)
|
||||
bat_status=$(</sys/class/power_supply/BAT0/status)
|
||||
|
||||
if [ $bat_status == "Charging" ]
|
||||
then
|
||||
battery_icon=""
|
||||
elif [ $bat_capacity -lt 15 ]
|
||||
then
|
||||
battery_icon=" "
|
||||
elif [ $bat_capacity -lt 35 ] && [ $bat_capacity -ge 15 ]
|
||||
then
|
||||
battery_icon=" "
|
||||
elif [ $bat_capacity -lt 60 ] && [ $bat_capacity -ge 35 ]
|
||||
then
|
||||
battery_icon=" "
|
||||
elif [ $bat_capacity -lt 90 ] && [ $bat_capacity -ge 60 ]
|
||||
then
|
||||
battery_icon=" "
|
||||
else
|
||||
battery_icon=" "
|
||||
fi
|
||||
|
||||
printf "$battery_icon ^c#f7ca88^$bat_capacity%%^d^"
|
Reference in New Issue
Block a user