PDA

View Full Version : display wireless signal strength in karamba



gordonb
05-10-2004, 01:19 AM
Here's the configuration file which adds a signal strength bar to karamba (adapted from the maverick theme of arkaine). It may be necessary to edit this for your laptop. On mine, the wlan card is eth0. The script parses the file /proc/net/wireless for the signal strength and displys it. Your results may vary.



karamba x=824 y=360 w=200 h=87 interval=1000 locked=false

image x=0 y=0 path="../home/knoppix/background.jpg"

<group> x=2 y=0

image x=2 y=4 path="../pics/network.png"
text x=24 y=5 text value="Network Info:" color=255,255,0 fontsize=10 font="Icarus" shadow=1

text x=15 y=23 text value="Signal Strength: " color=255,255,255 fontsize=8.9 font="Icarus" shadow=1
image x=95 y=24 path="../pics/barback.png"
bar x=96 y=25 sensor=program program="cat /proc/net/wireless | grep 'eth0:' | sed -e 's/eth0: *[0-9]* *//' | sed -e 's/\. .*//'" path="../pics/barmeter.png" w=80 max=92 h=6 interval=1000

image x=95 y=36 path="../pics/graphback.png"
graph x=96 y=37 sensor=network w=81 h=12 color=80,189,54 format="%in" max=10 interval=250
text x=15 y=38 text value="In.:" color=255,255,255 fontsize=9 font="Icarus" shadow=1
text x=30 y=38 sensor=network w=60 h=13 align=right format="%in Kb/s" color=80,189,54 fontsize=9 font="Icarus" decimals=2 shadow=1

image x=95 y=56 path="../pics/graphback.png"
graph x=96 y=57 sensor=network w=81 h=13 color=225,0,0 format="%out" max=10 interval=250
text x=15 y=58 text value="Out:" color=255,255,255 fontsize=9 font="Icarus" shadow=1
text x=30 y=58 sensor=network w=60 h=13 align=right format="%out Kb/s" color=225,0,0 fontsize=9 font="Icarus" decimals=2 shadow=1

</group>

aay
05-10-2004, 02:01 AM
Very nice. I moved your post over to the Tips and Tricks forum. I hope to give it a try next time I use Karamba.