diff options
Diffstat (limited to 'i3blocks')
-rwxr-xr-x | i3blocks/i3internet.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/i3blocks/i3internet.sh b/i3blocks/i3internet.sh index 3e63276..e9eb154 100755 --- a/i3blocks/i3internet.sh +++ b/i3blocks/i3internet.sh @@ -31,10 +31,11 @@ if [ -n "$wifiDev" ]; then #cut -d' ' -f6)) ($(egrep "^\s*w" /proc/net/wireless | #awk '{print int($3 * 100 / 70)"%"}'))" # with name + quality="$(grep -E '^\s*w' /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}')" + echo "$quality" | grep -q '100' && quality='100' wifi="$tick <span color='#79ff79'>$(nmcli | grep -F "$wifiDev: connected to " | - cut -d' ' -f4-) ($(grep -E '^\s*w' /proc/net/wireless | - awk '{print int($3 * 100 / 70)"%"}'))</span>" + cut -d' ' -f4-) (${quality})</span>" fi fi |