Update statusbar

This commit is contained in:
2022-05-11 13:26:31 +02:00
parent a6876bb54e
commit 5957aa3ed4
9 changed files with 58 additions and 14 deletions

13
.bin/sb-battery Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
cap="$(cat /sys/class/power_supply/BAT0/capacity)"
if [ "$cap" -ge 33 ];then
color="\x01"
elif [ "$cap" -ge 10 ]; then
color="\x03"
else
color="\x04"
fi
echo -n -e "$color $cap%"