#!/bin/sh

ifname=${1:-ib0}
prev=""
(while true ; do
	curr=`cat /proc/net/wireless`
	if [ "$curr" != "$prev" ] ; then
		prev=$curr
		level=`echo "$curr" | awk "/^$ifname:/ {print \\$3}"`
		echo "$level"
	fi
	sleep 1
done) | zenity --title "ibStatus" --progress --text="iBurst signal strength" --window-icon=info --percentage=0
