not a boston post.
I know, I know, it's been a week and I've yet to finish my blog-series about Boston. This post will be a quick one though that doesn't require much thought. On my desktop I run a desktop customization program called GeekTool. Using basic scripts you can completely customize your desktop to output the weather, to do lists, photos, and even your iCal events. When I first installed it I knew absolutely nothing about code, I hadn't even learned HTML yet. There was a bit of a learning curve, but for the most part a quick Google search will provide you with tips and tricks to customize your desktop the way you'd like.
My current layout is probably the one I am most proud of, so I thought I would share it here.

This particular customization uses one image shell, one file shell, and ten regular shells. The background is a modified background I found here. In Photoshop I moved Cookie Monster a bit further to the left to allow for more of a margin on the right side. I also added in the three vertical boxes on the left side. The icons are a hodgepodge of Who and Pirate icons, which I also found scattered around the interwebs.
I didn't know this when I originally began customizing, but on Mac's you can change the look of your icons and folders by clicking on "Get Info", then drag the .png image you want to use into the upper lefthand corner and drop it on the current icon.
Note: This will not work for iCal as that particular icon refreshes daily to reflect the date.
The Code:
To Do's, Work, & Sidebar Shells
I previously used a File Shell to display my to do list, but I kept encountering glitches where it would decide to not show up or it would output multiple versions of the file so I had the list running down my screen. This time around I used a Basic Shell and used "echo" to display the text.
My code looks a little like this:
I used a similar method for the right sidebar, but instead of inputing text I used
My current layout is probably the one I am most proud of, so I thought I would share it here.
This particular customization uses one image shell, one file shell, and ten regular shells. The background is a modified background I found here. In Photoshop I moved Cookie Monster a bit further to the left to allow for more of a margin on the right side. I also added in the three vertical boxes on the left side. The icons are a hodgepodge of Who and Pirate icons, which I also found scattered around the interwebs.
I didn't know this when I originally began customizing, but on Mac's you can change the look of your icons and folders by clicking on "Get Info", then drag the .png image you want to use into the upper lefthand corner and drop it on the current icon.
Note: This will not work for iCal as that particular icon refreshes daily to reflect the date.
The Code:
To Do's, Work, & Sidebar Shells
I previously used a File Shell to display my to do list, but I kept encountering glitches where it would decide to not show up or it would output multiple versions of the file so I had the list running down my screen. This time around I used a Basic Shell and used "echo" to display the text.
My code looks a little like this:
echo " To Do \n\n Matt's Website \n Update Danielle's Site \n Blog \n Robots \n Find Bunny Ears \n Fold Laundry"Note: "\n" will give you a carriage return.
I used a similar method for the right sidebar, but instead of inputing text I used
echo "\n\n\n\n\n" " _________________________" "\n\n\n\n\n\n\n\n\n\n" " _________________________" "\n\n\n\n" " _________________________" "\n\n\n\n\n\n\n\n\n\n" " _________________________"
to create the horizontal lines that separate each section.
Weather Shell
This was the most difficult to generate as it uses three scripts, two of which require a code from Yahoo! Weather.
Temperature:
Weather Image 1:
Weather Image 2:
Today's Events Shell
This is also a multi-step process, but never fear, it only gets easier from here on. First step, download iCal Buddy, a command-line utility that pulls information from your iCal. Once it is finished downloading run the install.command script. Choose the c option to change the installation path and then type in the new prefix to install all of iCalBuddy's executable and manual pages in. The default prefix is /usr/local.
Then you are ready to go! There is a manual included that can help you with the commands, but sometimes they don't act the way you expect them to. Also, order often matters.
I wanted my output to be just today's events from my home calendar, listed with no bullets, displaying the time before the title of the event, and with a blank line between each event.
Hit the carriage return and Terminal should display the name of your calendar, the type, and the UID.
Date Shell
I had a specific look that I wanted to achieve with this one, so the date is technically comprised of three shells. If you want your date to be in a line and all one size you should use "date +%A, &B %d" Otherwise, use the following:
month:
date:
day of the week:
Image Shell & Image Background Shell
These two shells are perhaps the easiest. First I created a square shell and set the background color to blue, this is the image background shell. Then I created an image shell and set the image to a photo on my computer. Overlaid the image shell over the image background shell and voila(!) a picture in a picture frame!
Weather Shell
This was the most difficult to generate as it uses three scripts, two of which require a code from Yahoo! Weather.
Temperature:
curl --silent "YOUR CITY CODE" | grep -E '(Current Conditions:|F
//' -e 's///' -e 's/<\/b>//' -e 's/
//' -e 's///' -e 's/<\/description>//'
To find YOUR CITY CODE go to weather.yahoo.com and type in your location. Once the page refreshes copy the URL, this is the code you will use.
example: http://weather.yahoo.com/united-states/new-york/new-york-2459115/
Weather Image 1:
curl --silent "YOUR CITY CODE/" | grep "current-weather" | sed "s/.*background\:url(\'\(.*\)\') .*/\1/" | xargs curl --silent -o /tmp/weather.png\This command works together with the command in Weather Image 2. Weather Image 1 will not display anything, whilst Weather Image 2 will show an image of the current weather. They will not work if you take one away.
Weather Image 2:
file:///tmp/weather.png
Today's Events Shell
This is also a multi-step process, but never fear, it only gets easier from here on. First step, download iCal Buddy, a command-line utility that pulls information from your iCal. Once it is finished downloading run the install.command script. Choose the c option to change the installation path and then type in the new prefix to install all of iCalBuddy's executable and manual pages in. The default prefix is /usr/local.
Then you are ready to go! There is a manual included that can help you with the commands, but sometimes they don't act the way you expect them to. Also, order often matters.
I wanted my output to be just today's events from my home calendar, listed with no bullets, displaying the time before the title of the event, and with a blank line between each event.
Okay, here's exactly what all of that madness means:/usr/local/bin/iCalBuddy -sd -nc -b "\n" -po "datetime,title" -eep "location,notes" -ic "INSERT YOUR CALENDAR CODE HERE" -n eventsToday
/usr/local/bin/iCalBuddy - tells GeekTool where to look for the executable files.
-sd - separate by date
-nc - doesn't display calendar names
-b "\n" - sets the bullets to carriage returns so you get a nice break in between events
-po "datetime,title" - this tells Geektool the order in which I want the time and title to be displayed
-eep "location,notes" - excludes event location and notes
-ic "INSERT YOUR CALENDAR UID HERE" - lets you choose which calendars you display. Not necessary if you only have one or two calendars.To find the UID of your calendars open up Terminal and type in
iCalBuddy calendars | grep -C3 -i homeiCalBuddy calendars tells Terminal what we want to look at, | sends the output of the command through a filter, grep is a search and -C3 asks Terminal to give you three lines above and below anytime it does find what you are searching for. -i means that your search term should be case insensitive, because really, who can ever remember if "home" is "home" or "Home". We aren't robots here. Lastly, home is the name of the calendar we want to search for.
Hit the carriage return and Terminal should display the name of your calendar, the type, and the UID.
example: 01CF9417-31F6-4104-B14F-36BE2F0526F6
Date Shell
I had a specific look that I wanted to achieve with this one, so the date is technically comprised of three shells. If you want your date to be in a line and all one size you should use "date +%A, &B %d" Otherwise, use the following:
month:
date +%B
date:
date +%d
day of the week:
date +%A
Image Shell & Image Background Shell
These two shells are perhaps the easiest. First I created a square shell and set the background color to blue, this is the image background shell. Then I created an image shell and set the image to a photo on my computer. Overlaid the image shell over the image background shell and voila(!) a picture in a picture frame!
That's it! I particularly like this specific customization because I can comfortably fit windows in between the sidebars without it feeling squished or covering up any of the important information I have chosen to post on my desktop.

