Geektool

Posted December 10th, 2009, by Aaron
No comments

So I recently upgraded my old G4 iBook to a 27” iMac. With the incredible increase in screen real estate, I found that I could (obviously) have a lot of stuff open on my desktop that would not be “in the way.” One application that I’ve been really impressed with is Geektool, a free application that lets you display different pieces of information on your desktop.

Geektool is definitely an application for advanced users. I’m not going to explain exactly how to use it. All I wanted to do was share the few scripts I’m using at the moment.

Stock Quotes

Displaying the stock quote for Apple, in the format of: Apple: 197.53 +7.66 (4.03%). I have this set to update every 1,800 seconds (30 minutes) since I don’t want to hit Google’s servers too often.


curl http://www.google.com/finance?q=AAPL | sed -n '/price-panel style/,/ Close/p' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'| sed '/^$/d' | sed -e '$!N;s/\n/ /' -e '$!N;s/\n/ /' | head -1 | sed 's/^/Apple: /g'

Calendar

I wanted a calendar that would highlight the current date in a different color. This script will highlight the current date in yellow. If you want a color other than yellow, change the 33 value to a different ANSI value. I have this set to update every 86,400 seconds (1 day). You’ll also want to use a Fixed Width font so that the dates line up properly. I use Menlo.


cal=`cal`; today=`date "+%e"`; echo "${cal/${today}/\033[1;33m${today}\033[0m}";

Weather

Probably my favorite scripts. This fetches a small image from Yahoo! and displays it along with the current conditions and a forecast for tomorrow. I update the conditions every 3,600 seconds (6 minutes). I also added the degree symbol (°) in a couple of places to spiff it up. There are multiple scripts, just change 66502 to your zip code:

Current conditions


curl "http://xml.weather.yahoo.com/forecastrss?p=66502&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//' -e 's/\(.*\) F/\1°F/' | tail -n1

Forecast


curl "http://xml.weather.yahoo.com/forecastrss?p=66502&u=f" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1°\  L\:\ \2°/" | sed "s/\?\(.*\)/\\1/"

Fetch the current condition image


curl --silent "http://weather.yahoo.com/united-states/kansas/manhattan-12786862/" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /var/tmp/weather10.png\

Display the current condition image (use File instead of Shell)


file://localhost/var/tmp/weather10.png

Three Months Later

Posted October 9th, 2009, by Aaron
No comments

Poor blog, how I’ve neglected you. Your hipper younger sibling, Twitter, gets all my attention. A few things did happen in the last few months since I’ve updated. They are outlined below:

  • In August, I visited New York City for the first time. What an experience. It seemed like I walked 30 miles in four days, but I saw so much. From the Empire State Building to Wall Street to the Seinfeld restaurant, I felt like everywhere I turned there was a famous spot. Many photos were taken. Will definitely go back at some point. I must say that the compass/GPS combo on the iPhone 3GS was incredibly handy in a big city.
  • In September, I was lucky enough to be able to see one of my favorite bands, Phoenix, live in Omaha, NE. They played an awesome set and were genuinely excited to be performing in an unfamiliar place. Note that Phoenix is from Paris, France and doesn’t see the Midwest of the United States very often.
  • Halo 3: ODST came out and many hours of fun were had by all.

So I guess that’s about all that was noteworthy. For now, enjoy a video I shot of Phoenix performing “1901” with my chrome Flip MinoHD.

June Happenings

Posted June 23rd, 2009, by Aaron
No comments

So it’s been a while since I’ve written, but to you, my loyal readers, I say, “Fear not!” since this update is chock full of sweet information and maybe even a video if you stick it out to the end! Here is what I’ve been up to this past month:

iPhone Upgrade

I upgraded from my original (read: badass) iPhone to the iPhone 3GS (formerly known as the 3G S). I’ve been using it less than a week, and my first impressions are:

  • it is noticeably faster (duh)
  • the compass fails frequently
  • the voice control is decent
  • the auto-focus on the camera is nice
  • the video recording feature is better than I expected

I’m still unsure if it was worth the $200 upgrade cost, not to mention the $10.00 in extra data charges since my previous phone did not require a 3G plan, but time will tell. I ended up choosing the black finish. Now I just need to figure out what to do with my other iPhone.

Roger Federer wins career Grand Slam

No further commentary necessary. The guy is a tennis god. I’m not going to lie, I almost cried when he won at Roland Garros.

Cristiano Ronaldo says adios to Manchester United

Great news if you’re a Liverpool supporter, like me, since this guy has been terrorizing the Premier League the last few years. Maybe without Ronaldo and Tevez running riot, Liverpool can finally win the league.

Pennsylvania

I traveled to Pennsylvania to visit my good friend Matt who lives in State College, PA. We attended our final(?) nine inch nails show on June 10 in Burgettstown, PA (just outside of Pittsburgh). Matt gave me a decent tour of Pittsburgh, but I’d say we were both more interested in the concert than the sights of the Steel City. I was really excited that I got to attend my final show with him, since he and I both saw NIN for the first time in 2000 in Kansas City, then again in 2008 in Philadelphia. All three shows were great.

This Burgettstown show was only two weeks after my previous Kansas City show, but the two shows couldn’t have been more different. First, the venue in Kansas City was relatively small (~8,000 people) whereas this place held ~20,000 with the open lawn. Second, there was no pit in KC so it seemed very subdued. We had pit tickets for Burgettstown so it felt like your typical NIN concert. Lastly, the crowd in PA looked like they were there for a Willie Nelson show. No offense to the PA folk, but I saw some odd stuff when we were driving to the venue.

Since NIN encourages cameras for this tour, we decided we’d bring in some equipment to get some high quality video. You can check out my flickr photostream for an idea. I must say that the Flip minoHD is a great little camera. Good thing Matt brought two. As promised, here is one of our videos, and you can view the rest of our videos on YouTube. For your enjoyment, here is “Burn” in HD glory.