Added Statusbad Commands (Not in correct location)

This commit is contained in:
2022-09-21 20:51:46 +01:00
parent 8afd56ea27
commit 990568295b
12 changed files with 125 additions and 0 deletions

25
statusbar/dwm_battery Executable file
View 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^"