Fun with geek tool

Thanks again to LifeHacker, I’ve been playing around with Geek Tool. It’s a tool for OS X that can do a bunch of things, I’m using it to create some desktop widget type things. I got the code to display the current weather conditions from this post and decided to play around with adding some additional code.

So after mucking around with the graphical interface and figuring a few things out (which really isn’t difficult to do) I came up with a little routine that checks latency to the inside interface on my firewall. It’s really nothing special but I kind of like seeing it up there.

You can paste this into the command window in Geek Tool or put it in a file and call it as a shell script. Here’s the code (replace YOURIP with your real IP address obviously). You may need to modify the script slightly if your ping output isn’t the same as what I’m using.

ping -c 1 YOURIP | grep -i icmp_seq | sed -e 's/64 bytes from YOURIP: icmp_seq=0 ttl=64 time=/Wireless lag: /'

I set the refresh rate for 60 seconds and have the status feedback image enabled, if the little green bubble turns red then it’s skipped a beat. I found a bunch of other really useful posts about scripting too, here’s a couple to get you started if you’re interested:

Leave a reply below!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s