Green Screen

Posted in System by WhidbeyWayne 1927 days ago

Most of these glets are unmodified versions found on this forum. The two I've attached here are based on samples found here, but with my modifications and rolling them into one script. This looks best with a fixed width font.

The Folders.glet is really simple. Not much to explain with it. Just adjust the paths and name to your needs.

For the KeyStats.glet, it has several parts. I’ve placed comments in there to help you out, but here’s a quick run-through from the top:

Right after the initial comments are the bold, no bold, and red variables used later in the script.

Next is where we get the battery status information and present it.

From there it checks for your external IP address. If it finds one, it will display it. Same goes for the network interfaces. I sometimes use wireless, Thunderbolt, and USB adapters in my machine. So I check for each and display if it's there. The trick here is to do an ifconfig and determine which enX matches which of your adapters. For machines with a built in Ethernet adapter, that’s usually en0 and then the wifi will be en1. My MacBook Pro Retina does not have a built in Ethernet adapter, so the wifi is en0. I’ve also included PPTP and IPSec tunnel detection in this section.

Now for the Airport. Another straight forward section. I’m only pulling the first two names from an SSID. If you need more, follow the example of ssid0 and ssid1 to add a ssid2 and so on. For the SNR, I simply look at the difference between the noise level and the receive signal strength.

Last section is to check the status of the application firewall. Anything other than Enabled will change to red.



Geeklet files to download


User Avatar
jamo0001 1914 days ago
hi wayne-

what calendar glet did you use?
User Avatar
WhidbeyWayne 1906 days ago
Hi Jamo0001-- I was looking back through the glet's and could not find who's I used for this, so if the author recognizes his or her code, please speak up. Here it is:

cal_head=`cal | head -1`; cal_tail=`cal | tail -7`; today=`date "+%e"`; echo "$cal_head"; echo "${cal_tail/${today}/\033[1;31m${today}\033[0m}";
User Avatar
ganeshpawar 1883 days ago
Great I Like It.

Log in to comment or register here.