feat: eww hypr alacritty and more

This commit is contained in:
Fabio Lenherr 2022-08-31 00:28:44 +02:00
parent 7fb4f9ee73
commit 99f7c60db7
No known key found for this signature in database
GPG key ID: 868FFD689D878939
431 changed files with 9853 additions and 23 deletions

77
eww/scripts/battery Executable file
View file

@ -0,0 +1,77 @@
#!/bin/sh
bat=/sys/class/power_supply/BAT0/
per="$(cat "$bat/capacity")"
char="$(cat "$bat/status")"
icon() {
#[ $(cat "$bat/status") = Charging ] && echo "" && exit
if [ "$char" == "Charging" ]; then
if [ "$per" -gt "90" ]; then
icon=""
elif [ "$per" -gt "80" ]; then
icon=""
elif [ "$per" -gt "70" ]; then
icon=""
elif [ "$per" -gt "60" ]; then
icon=""
elif [ "$per" -gt "50" ]; then
icon=""
elif [ "$per" -gt "40" ]; then
icon=""
elif [ "$per" -gt "30" ]; then
icon=""
elif [ "$per" -gt "20" ]; then
icon=""
elif [ "$per" -gt "10" ]; then
icon=""
elif [ "$per" -gt "0" ]; then
icon=""
else
echo  && exit
fi
else
if [ "$per" -gt "90" ]; then
icon=""
elif [ "$per" -gt "80" ]; then
icon=""
elif [ "$per" -gt "70" ]; then
icon=""
elif [ "$per" -gt "60" ]; then
icon=""
elif [ "$per" -gt "50" ]; then
icon=""
elif [ "$per" -gt "40" ]; then
icon=""
elif [ "$per" -gt "30" ]; then
icon=""
elif [ "$per" -gt "20" ]; then
icon=""
elif [ "$per" -gt "10" ]; then
icon=""
notify-send -u critical "Battery Low" "Connect Charger"
elif [ "$per" -gt "0" ]; then
icon=""
notify-send -u critical "Battery Low" "Connect Charger"
else
echo  && exit
fi
fi
echo "$icon"
}
percent() {
echo $per
}
stat() {
echo $char
}
[ "$1" = "icon" ] && icon && exit
[ "$1" = "percent" ] && percent && exit
[ "$1" = 'stat' ] && stat && exit
exit