GeekTool Scripts

Luke,on the topic of  Apple, Fun, Tools
10.13.2009   |   12comment

The code on this post has been updated. View here to get the latest.

In my previous post I talked about what I have been doing to my desktop the last little while. I had quite a few email or IM me asking about how the GeekTool scripts I used. Just take these scripts and copy the lines you want into the command area of a Geeklet. Most of these were written by Mac Newbold. Enjoy!

CPU Usage

top -n1 -l1 | grep "Load Avg" | sed 's/.*usage: //; s/ user.*//;'
top -n1 -l1 | grep "Load Avg" | sed 's/.*user, //; s/ sys.*//;'
top -n1 -l1 | grep "Load Avg" | sed 's/.*sys, //; s/ idle.*//;'

Memory

top -n 1 -l 1 | grep PhysMem | sed 's/.* inactive, //; s/ used.*//;'
top -n 1 -l 1 | grep PhysMem | sed 's/.* used, //; s/ free.*//;'

Month

date +%B

Date

date +%d

Day

date +%A

Time

date +%I:%M

AM / PM

date +%p

Weather

curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USUT0078&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>//'

Look for the ‘UT0078′ here and replace it with the city code you want to display. Get the city code by going to Yahoo Weather and searching for your city. Once found look in the url and you will see your city code at the end of the url.

Weather Image

Create a new Shell Geeklet and use this as the command:

curl --silent "http://weather.yahoo.com/forecast/USUT0078.html" | grep "forecast-icon" | sed "s/.*background\:url(\'\(.*\)\')\;\ _background.*/\1/" | xargs curl --silent -o /tmp/weather1.png\

Replace the city code with your city code. ( same steps to get city code as above )

Then create a new Image Geeklet and use this as the url:

file:///tmp/weather1.png


Dockless Desktop

Luke,on the topic of  Apple, Fun, Tools
10.13.2009   |   1comment

So for a few weeks now I have been playing around with a themed desktop for my mac. I have always wanted to try something like this out just never had the guts or time. I have found that it isn’t scary at all and rather quick to get going. There are some free tools I have used and some nice things I have learned along the way.desktop1

Not having a dock at all has taken some getting used to. I use Quicksilver for just about everything now. I do have a pull down docklike thing at the top middle in case I ever need it. Here is a list of tools I have used to create my new desktop.

CandyBar - Change all the folders icons and HD icons.
Magnifique - Change the folder and App nav areas to black
GeekTool - Add time, weather, and computer status to the desktop.

GeekTool was by far the most fun. You can do much more with it than what I have done here. If you come up with something good for you I’d love to see it.


Safari 4.0 Beta

Luke,on the topic of  Apple, Browsers
02.24.2009   |   0comment

safari1

Apple released a public beta version of Safari 4 today. It looks really good! Here is a list of some of the new features. For a full list check out Apple’s website.

  • Developer Tools (similar but different than FireBug)
  • Passed the Acid 3 Test
  • CSS Effects
  • Tabs on Top
  • Cover Flow bookmars

Show Full File Paths in Finder

Luke,on the topic of  Apple
02.23.2009   |   6comment

The only real gripe I have had about OSX is that when I have a file highlighted in the Finder I want to look at a glance somewhere to see where exactly that file is. I have actually had a couple discussions with others that have not switched to a Mac because of this. I just lived on wondering why this feature was not available. Then I stumbled upon this in my RSS reader. The good guys over at TUAW had an answer! Once enabled, this is what you will see in any open Finder window.

picture-2_terminal-tips_-enable-path-view-in-finder_cb12793

To get this working on your mac open a terminal (/Applications/Utilities/Terminal) and then paste in this script and press enter. You will have to restart Finder to see your new and improved window.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Multi Fire Fox

Luke,on the topic of  Apple, Browsers
02.20.2009   |   4comment

multifirefoxAs a front end guy I am always looking for ways to help our website look the same in all browsers. When FireFox 3 came out I was all excited for a new browser, however this also means that I would have yet another browser to test in until FireFox 2 phases out. I have noticed some small differences in how FF2 and FF3 render. I came across this little tool that lets me run both of them at the same time. It is called MultiFireFox. It will let you keep all your plug-ins for each version as well. That means that we can use fire bug on both version to help with debugging. I think this version is only for the Mac but for you PC users our there check this out. I’m not sure if there is anything like this for Linux.