#!/bin/bash # vim:sw=4:noet:ts=4: # Wireless geiger counter, L. David Baron . # Public domain. No warranty. # Rewrite of script by Ian Hickson with better pitches. beepat() { PITCH=$1 xset b 50 $PITCH 200 echo -n "" usleep 50000 } doreset() { xset b 50 400 100 } trap doreset EXIT while : do LEVEL=`cat /proc/net/wireless | grep -v '|' | head -1 | cut -b14-17` echo -n "$LEVEL" beepat `guile -c "(display (round (* 130.8 (expt 2 (/ $LEVEL 12)))))" | cut -d. -f1` done