initial commit

This commit is contained in:
THEON-1
2025-12-04 19:12:13 +01:00
commit 5632833dab
5 changed files with 181 additions and 0 deletions

22
wifi Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
if [[ ! -d /sys/class/net/${interface}/wireless ]] || [[ "$(cat /sys/class/net/$interface/operstate)" = "down" ]];
then exit
fi
DATA=$(grep $interface /proc/net/wireless)
IFS=" " read -r -a DATA <<< "$DATA"
QUALITY=$(echo "${DATA[2]}*100/70" | bc)
echo "$QUALITY%"
echo "$QUALITY%"
if [[ $QUALITY -ge 80 ]]; then
echo "#98971a"
elif [[ $QUALITY -lt 80 ]]; then
echo "#D79921"
elif [[ $QUALITY -lt 60 ]]; then
echo "#FFAE00"
elif [[ $QUALITY -lt 40 ]]; then
echo "#FF0000"
fi