Change back to /bin/sh from /usr/bin/env sh

This commit is contained in:
agryphus 2024-02-20 21:10:52 -05:00
parent 52f41ba6e7
commit 33d9dc616a
7 changed files with 71 additions and 23 deletions

View file

@ -1,18 +1,22 @@
#!/bin/sh
battery=$(cat /sys/class/power_supply/BAT0/capacity)
battery=/sys/class/power_supply/BAT0
capacity=$(cat $battery/capacity)
bstatus=$(cat $battery/status)
if [ $battery -gt 80 ]; then
if [ "$bstatus" = "Charging" ]; then
symbol=󰂄
elif [ $capacity -gt 80 ]; then
symbol=
elif [ $battery -gt 60 ]; then
elif [ $capacity -gt 60 ]; then
symbol=
elif [ $battery -gt 40 ]; then
elif [ $capacity -gt 40 ]; then
symbol=
elif [ $battery -gt 20 ]; then
elif [ $capacity -gt 20 ]; then
symbol=
else
symbol=
fi
echo "${symbol} ${battery}%"
echo "${symbol} ${capacity}%"