Sweet! Thanks mike!
Check this out, might be it's of interest to someone:
if curl -f -s
http://google.com > /dev/null ; then echo "Connected" ; else echo "Not connected" ; fi ;
Checks whether you're connected and displays the appropriate line. I wanted a more graphical approach, say, an image of my choosing. A solid planet if I'm connected, a transparent one if I'm not.
So I went with:
ON.glet: Image geeklet of a working internet station.
Off.glet: Image geeklet of a disconnected station.
if curl -f -s
http://google.com > /dev/null ; then open ON.glet ; else open Off.glet ; fi ;
This has 2 minor flaws:
1) Let's say I'm connected when the script checks the first time. It will open the image Connected but it will LEAVE IT OPEN indefinetly. So if I disconnect before the next check, it will open the image Disconnected but the connected one will still be there. So the script needs an extra line for an "And" command, like "if connected, open ON.glet AND close Off.glet, else open Off.glet AND close ON.glet"
I just don't know how to do that...
Also 2) The command works just fine directly on terminal, however when I add it to geektools nothing happens =(