new eww
This commit is contained in:
16
home/programs/eww/src/scripts/battery_icon.sh
Executable file
16
home/programs/eww/src/scripts/battery_icon.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
bat=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
stat=$(cat /sys/class/power_supply/BAT0/status)
|
||||
|
||||
icon=""
|
||||
|
||||
if [[ $stat == "Charging" ]]; then
|
||||
icon=""
|
||||
elif [[ $bat -le 10 ]]; then
|
||||
icon=""
|
||||
elif [[ $bat -le 50 ]]; then
|
||||
icon=""
|
||||
elif [[ $bat -le 80 ]]; then
|
||||
icon=""
|
||||
fi
|
||||
|
||||
echo "$icon"
|
||||
Reference in New Issue
Block a user