#!/bin/sh base=~/.icons/Paper-Mono-Dark/24x24/panel/network-wireless excellent=$base-signal-excellent.svg good=$base-signal-good.svg ok=$base-signal-ok.svg low=$base-signal-low.svg none=$base-signal-none.svg no_route=$base-no-route.svg offline=$base-offline.svg echo $base-acquiring.svg while true; do x=$(cat /proc/net/wireless | awk 'NR < 3 {next} {printf "%.0f", $4}') if [ -z $x ]; then echo $offline elif [ $x -ge -55 ]; then echo $excellent elif [ $x -ge -65 ]; then echo $good elif [ $x -ge -75 ]; then echo $ok elif [ $x -ge -85 ]; then echo $low elif [ $x -ge -90 ]; then echo $none else echo $no_route fi sleep 2 done