#!/bin/sh base=~/.icons/Paper/24x24/panel/network excellent=$base-wireless-signal-excellent.svg good=$base-wireless-signal-good.svg ok=$base-wireless-signal-ok.svg low=$base-wireless-signal-low.svg none=$base-wireless-signal-none.svg offline=$base-wireless-offline.svg while true; do sleep 3 x=$(ifconfig wlan0 list sta) if [ $? != 0 ]; then echo $offline continue fi x=$(echo "$x" | awk 'NR == 1 {next} {printf "%.0f", $5}') if [ $x -ge 20 ]; then echo $excellent elif [ $x -ge 15 ]; then echo $good elif [ $x -ge 10 ]; then echo $ok elif [ $x -ge 5 ]; then echo $low else echo $none fi done