blob: ae54aeb5fdb031645d67da71f5f921e3e118897d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
status="$(nmcli general status | grep -oh "\w*connect\w*")"
if [[ "$status" == "disconnected" ]]; then
printf " "
elif [[ "$status" == "connecting" ]]; then
printf " "
elif [[ "$status" == "connected" ]]; then
# strength="$(nmcli -f IN-USE,SIGNAL device wifi | grep '*' | awk '{print $2}')"
strength="$(python $HOME/scripts/wifi-conn-strength)"
if [[ "$?" == "0" ]]; then
if [[ "$strength" -eq "0" ]]; then
printf " "
elif [[ ("$strength" -ge "0") && ("$strength" -le "25") ]]; then
printf " "
elif [[ ("$strength" -ge "25") && ("$strength" -le "50") ]]; then
printf " "
elif [[ ("$strength" -ge "50") && ("$strength" -le "75") ]]; then
printf " "
elif [[ ("$strength" -ge "75") && ("$strength" -le "100") ]]; then
printf " "
fi
else
printf " "
fi
fi
|