ThemeMyMac

March 6, 2009

GeekTool: Explained for Beginners

Filed under: Applications, Customization, Desktop Customization, Geektool — Tags: , , , — Shaded @ 5:40 am

GeekTool is a simple tool (hence the latter part of the name) for displaying UNIX codes (hence the first part) on your Mac desktop. It displays the output from whatever command you do — simple as that. As an added bonus, you can also display text files such as to-do lists and images such as webcams.

Here is an example of what geektool looks like running on my desktop:

Here is how you enter scripts into Geektool:

First off, open the Geektool preference pane by going to System Preferences. System Preferences can be found by going to Apple (the icon) —> System preferences… in any menu. This application can also be found in the Applications folder on your computer.

In System Preferences, click on the GeekTool preference pane:

In the GeekTook preference pane, make sure that the Enable GeekTool checkbox is checked. Then, create a new entry by hitting the New Entry button along the right side of the window. Now, in the Entry pop-up menu along the top, switch to Shell:

Next, enter in the word “uptime” into the Command text box:

You now have a box on your desktop that you can drag around! It shows you how long your computer has been running, how many users are on it, and what the load averages are.

To get rid of the color around the box, just exit out of the GeekTool preference pane.

Before you get begin creating all of the scripts, I suggest that you mess around with GeekTool. You can add scripts, files, and images by selecting which one that you want from the Entry pop-up menu mentioned earlier. You can mess with the colors, fonts, and text by selecting the associated tab. If you need a script so that you can mess with fonts, just enter the same “uptime” code into the Command text box on a shell entry. Figure out how to use all the components of GeekTool.

Here is a huge… HUGE… list of scripts for GeekTool:

Since some scripts require that you use a file, you must locate a file and place its destination into the Command text box.

#1: Processes

This code shows you what is running and what resources it is using on your computer. This is one of the most useful scripts for GeekTool. Enter this into the Command text box:

top -ocpu -FR -l2 -n20 | grep '^....[1234567890] ' | grep -v ' 0.0% ..:' | cut -c 1-24,33-42,64-77

Result:

72425 firefox-bi  36.8%   30   197  257M  1254M

84 SymAutoPro  34.9%    7     0 9696K   652M

24942 Digital Se  16.3%    6   131 5632K   978M

37890 Borderless   4.2%    7   199 9768K  3091M

74552 top          4.2%    1    21 1000K   586M

388 WindowServ   3.3%    5   505   44M  1063M

0 kernel_tas   3.1%   56     2  288M   533M

72426 MacHeist C   1.1%    4   114   17M   921M

11356 GeekTool     0.9%    7   183 9956K   918M

74512 Terminal     0.9%    3    99 7440K   914M

24680 SimpleFloa   0.2%    2    94 2164K   912M

88897 Typinator    0.2%    8   606 7920K   925M

58425 Mail         0.1%   15   311   17M   960M

38475 diskimages   0.1%    4    73  912K   606M

However, if you do not need all of that useless information, enter in this code instead:

ps -Aro%cpu, ucomm, user

Result:

%CPU UCOMM            USER

8.1 Safari           oli

4.2 Software Update  boli

3.0 Adium            oli

1.5 WindowServer     windowse

0.7 SystemUIServer   boli

0.6 Hptsvr           root

You can also use the following code:

ps -arcwwwxo "pid %cpu command" | egrep "PID|$1" | grep -v grep | head -12 | tail -11

Result:

72425 70.2 firefox-bin

84 57.9 SymAutoProtect

24942 19.4 Digital Sentry

388 3.6 WindowServer

37890 3.6 Borderless

74512 1.7 Terminal

72426 1.3 MacHeist Chat

11356 1.2 GeekTool

74613 0.3 System Preferences

88897 0.2 Typinator

58425 0.1 Mail

Twitter: That Micro-Blogging Thing You’ve Been Avoiding

First, follow this guide to install it.

If you want it in simple terms, just follow these steps:

  1. Download and unzip this.
  2. Now, go to Spotlight and type in “Terminal.” Now, select the application from the list to open it. This application can also be found in the Utilities folder in the Applications folder on your startup disk.
  3. In Terminal, type “cd Downloads.” For this to work, you must have unzipped the file from above.
  4. Now, type “cd rubygems-1.3.1″
  5. Next, type “ruby setup.rb”
  6. Ruby Gems is now installed. Pat yourself on the back.
  7. Now that Ruby Gems has been installed, type “sudo gem install twitter” and enter your password if necessary.
  8. Once that is done installing, type “sudo gem install main highline sqlite3-ruby” and type your password again if prompted.
  9. Once you are done with that, type “sudo gem install activerecord -v 2.2.2″
  10. Now that you are finally done with Terminal, enter the following code into the Command text box in the GeekTool preferences:

twitter timeline

If you need additional help, look on the Ruby Gems’s site or the Twitter Gem Site.

There is another method of doing this… I like this alternative because you can also send Twitter messages from Terminal once this Ruby Gem has been installed.

IP Address

Download this and place it directly into your home folder.

Uptime: General Information about Your Computer

As mentioned above, enter the simple code “uptime” into the Command text box in the GeekTool Preference Pane.

That’s seriously it. :)

However, if you want a more complex one, enter in this code:

uptime | awk ‘{printf “up : “ $3 “ “ $4 “ “ $5 “ “ }'; top -l 1 | awk ‘/PhysMem/ {printf “RAM : “ $8 “, }' ; top -l 2 | awk ‘/CPU usage/ && NR > 5 {print $6, $7=, $8, $9=“user”, $10, $11=“sys”, $12, $13}'

Calendar

Enter in this code into the Command text box:

cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"

If you want to have the calander replaced with a _ instead of a # because it is easier to read, enter in the following code:

date “+ %a, %b %e, %Y” ; cal | sed “s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./_/g') /” | tail -n 7 ; /Library/Frameworks/Python.framework/Versions/2.4/bin/python2.4 /usr/local/bin/gcalcli –nc agenda

Thanks to Dzurn from Lifehacker for entering that into the comments!

LHC Webcam: Monitor the End of the World

Enter in this image URL into the URL : text field under the Picture selection from the Entry pop-up menu:

http://atlaseye.web.cern.ch/atlaseye/Pictures/tec_coord_web/geneva/webgeneva.jpg

News from RSS Feeds

This requires Lynx. Download it here.

Here is the readme:

Installation:

  1. Double click the install.command file and give Your password (admin rights are required.)
  2. Drag the “lynx.command” application to your local disk ( Applications folder is best )

Download and place this into your home folder:

sh /Users/YOURUSERNAME/new.sh AMERICAS BUSINESS

Change “AMERICAS BUSINESS” above to other topics of your interest. The options are:

News Front Page | Africa | Americas | Asia-Pacific | Europe | Middle | East | South Asia | UK | Business | Health | Science & Environment | Technology | Entertainment | Also in the news | Have Your Say

If you do not like Lynx or the British, here is a script to view any RSS feed:

http://code.google.com/p/sh-rss-feed/

  1. Download this file.
  2. Move it to your home folder.
  3. Enter this code into GeekTool:

sh /Users/YOURUSERNAME/news.sh -4

Unread Adium Messages

Download this and place it into your home folder.

Now, put this into the Command text box in GeekTool:

osascript /Users/YOURUSERNAMEHERE/Adium.scpt

Lifehacker RSS Feed:

Enter this code into the Command text box:

curl feeds.gawker.com/lifehacker/excerpts.xml | grep CDATA | sed -e 's/(.*[)//' -e 's/].*//'

You can change the “gawker” (mentioned above) text to any address that you want, but make sure that it does not have “feed://” when you put the code into GeekTool.

Weather Photos

Enter in one of these image URLs into the URL : text field under the Picture selection from the Entry pop-up menu:

US Visible Satellite

Northeast Infrared Satellite

World Satellite

Thanks to macgeekery for finding these!

Time

Enter in this code into GeekTool:

Day: date +%A

Date: date +%d

Month: date +%B

Time: date +”%I:%M”

Seconds: date +%S

AM/PM: date +”%p”

For a more in-depth tutorial on how to make your GeekTool time look beautiful, go here or view some examples here.

Weather Temperature and Conditions

Make sure that Lynx is installed Look above at the BBC news script and Lynx installation instructions. You only need to enter in two simple codes. For the first one, replace “00000″ with your ZIP code.

Temp: lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=00000|awk ‘/Temp/{printf $2, “: “; for (i=3; i<=3; i++) printf $i ” ” }’

Conditions: lynx -dump http://printer.wunderground.com/cgi-bin/findweather/getForecast?query=00000|awk ‘/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i ” ” }’

Trash Size

Enter in this code:

du -sh ~/.Trash/ | awk '{print $1}'

Result:

580M

Current Airport Network and Signal Strength:

Download this and place it in your home folder:

sh /Users/YOURUSERNAMEHERE/airport.sh

Result:

Airport : Linksys – 8

Unread Email Count in Mail:

Enter in this code into GeekTool:

echo 'tell application "Mail" to return unread count of inbox as string & ""' | osascript | grep -v '0'

If you use Gmail, go here to find out how to use GeekTool with Gmail.

GeekTool Memory Usage:

Enter in this code

ps axo "rss,ucomm" | awk '/Geek/ {printf "%.2f", $1/1024}'

MacHeist Team Scores:

Lynx is needed for this one.

Thanks to CraftyHeist from MacHeist for this one!

Here is the code:

lynx -source http://macheist.seems.nl/access/csv.php?num=4 | awk '{split($0,a,","); print "(" a[2] ") " a[3] }'

Change “craftyheist” in the below codes to your own MacHeist username.

To view your individual points total, enter in this code:

curl -s http://rdic.mmnow.nl/api/txt/bot.php?user=craftyheist | grep Points | tr -d <>[a-zA-Z: ]

To see your leader board position, enter this into GeekTool:

curl -s http://rdic.mmnow.nl/api/txt/bot.php?user=craftyheist | grep Rank | tr -d <>[a-zA-Z: ]

The above 2 commands use the RDIC’s feed data. Because of this, please set the number in the Refresh : text field to a high value in order to avoid hammering the server.

SMART Status:

Here’s a nice one to display the SMART status of your hard drive:

The command used is from here

First, you will need to enter the names of the drives. Open Terminal and type:

diskutil list

http://img220.imageshack.us/img220/9921/terminal1.jpg

Now, add the command below. Replace the (*) asterisk with your drive name.

‘diskutil info * | grep Verified > /dev/null’  to GeekTool

http://img89.imageshack.us/img89/9615/geektool2.jpg

Next, select the Icon tab and click the Default button:

http://img144.imageshack.us/img144/9615/geektool2.jpg

Place the icon next to the appropriate hard drive icon and you should get a nice green icon telling you your hard drive’s condition. If a SMART error is detected, the icon should become red. Otherwise, the icon will be green.

http://img217.imageshack.us/img217/9661/desktop1.jpg

Stocks/Financial:

For gold futures, enter in this code into GeekTool:

curl http://www.barchart.com/ | grep 'Gold' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Gold/GOLD /g' | sed 's/+/ +/g' | sed 's/-/ -/g'

To view oil futures, enter in this code:

curl http://www.barchart.com/ | grep 'Oil' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -1 | sed 's/Crude Oil/OIL /g' | sed 's/-/ -/g'

To see the S&P, enter this in:

curl http://www.google.ca/finance?q=INDEXSP:.INX | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/n/ /' | sed '$!N;s/n/ /' | sed 's/^/S&P 500 /g'

For the DOW, enter in this code:

curl http://www.google.ca/finance?q=INDEXDJX:.DJI | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | tail -3 | sed '$!N;s/n/ /'| sed '$!N;s/n/ /' | sed '$!N;s/n/ /' | sed 's/^/DOW /g'

To view NASDAQ’s position, enter in the following code:

curl http://www.google.ca/finance?q=INDEXNASDAQ:.IXIC | sed -n '/chg/{x;1!p;g;p;n;p;};h' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | sed '$!N;s/n/ /' | sed '$!N;s/n/ /' | sed 's/^/NASDAQ /g'

For the total market chart, use this:

http://www.google.com/finance/chart?…EXNASDAQ:.IXIC

Battery Usage:

For battery usage, use this code:

system_profiler SPPowerDataType | awk ‘/Full/ || /Remaining/ || /Cycle/ { printf }’ | sed -e ’s/[^:]*/Battery/’ -e ’s/ *R.*):.///’ -e ’s/ *Cycle/ (mAh)     Cycle/’

I have not gotten this code to work very well, so if someone manages to get it to work, please tell me in the comments!

History Lesson/This Day in History:

Use this code in GeekTool:

grep -h "^$(date '+%m/%d')" /usr/share/calendar/calendar.{holiday,history,computer}|cut -f2

Result:

Three Mile Island releases radioactive gas, 1979

DEC announces PDP-11, 1970

Disk Usage:

For disk usage, use the following codes in the Command text box in GeekTool:

df -h | grep disk0s2 | awk ‘{print “System:”, $3, “of”, $2, “-”, $4, “available”}’ | sed ’s/Gi/Gb/g’;

df -h | grep disk0s3 | awk ‘{print “UserHD:”, $3, “of”, $2, “-”, $4, “available”}’ | sed ’s/Gi/Gb/g’;

Result:

System: 71Gb of 74Gb – 3.3Gb available

Hulu:

Because I had problems installing hpricot, I will direct you here to view the tutorial.

iTunes

If you are crazy and want to use GeekTool to display your music currently playing in iTunes instead of using one of the many different applications out there, simply download this script and then put this code into GeekTool:

osascript /Users/macadmin/itunes.scpt

Result:

“Slum” by I-20/Shawnna (3)

from 2 Fast 2 Furious

Mounted Local Drives

If you don’t like the cluttered mounted drive icons but want to know what disk images or other drives you have mounted, enter the following code into GeekTool:

df -H -l

That’s all there is, at least on my desktop. ;) By the way, this post will be updated as new scripts reveal themselves. When a significant update to this post comes along, I will post a new post to alert those who are subscribed to the RSS feed, so if you want to be updated on the newest GeekTool scripts, subscribe to my RSS feed by going here!

Sources:

http://www.leancrew.com/all-this/2007/12/geektool-with-itunes-and-pandora/

http://osx.iusethis.com/app/geektool

http://code.google.com/p/itunescli/

http://allancraig.net/blog/?p=373

http://code.google.com/p/sh-rss-feed/

http://snipplr.com/view.php?codeview&id=5049

http://forums.macrumors.com/showthread.php?t=628023&page=13

http://www.flickr.com/photos/donnyboy09/3351110814/

http://www.macheist.com/forums/viewtopic.php?id=12999

http://nicinabox.com/geektool/

http://www.tssoftware.net/?p=55

http://www.macgeekery.com/tips/cli/geektool_and_bash_one-liners

http://www.flickr.com/photos/32717975@N04/3315739681/

http://www.keynote2keynote.com/2007/04/10/ultimate-geektool-setup-pimp-your-desktop-part-2/

http://www.flickr.com/photos/davitr0n/3290921909/

http://www.macosxhints.com/article.php?story=20040706234745708

http://episteme.arstechnica.com/eve/forums/a/tpc/f/8300945231/m/926001299731

If anyone finds any mistakes, please comment and I will fix it! If you find an above script that I forgot to cite at all or at least properly, add a comment!

Thanks for reading!

70 Comments »

  1. [...] [...]

    Pingback by Desktop: March 2009 - Page 3 - Mac-Forums.com — March 7, 2009 @ 10:53 am

  2. Do you know of any way to obtain lynx that doesn’t download from the osxgnu site? I’m having trouble getting it and would like to make use of some of the scripts that require lynx.

    Comment by Garrett Richey — March 10, 2009 @ 7:20 am

  3. Try: http://habilis.net/lynxlet/

    Comment by Shaded — March 10, 2009 @ 11:09 pm

  4. Thanks for collecting these Geektool tips! I’ve added the SMART status icons and they look great.

    Some of the shell scripts are showing HTML entities (& gt ; instead of the actual greater-than symbol).

    And the first example had smart quotes “ ” ‘ ' instead of programmer’s quotes ” ‘ etc.

    Otherwise great job. It might also be helpful to show a cropped display of what the output is supposed to look like.

    Thanks
    Darryl

    Comment by dzurn — March 18, 2009 @ 1:22 pm

  5. I meant the advanced ‘uptime’ example, not the TOP example, had typographer’s quotes.

    Comment by dzurn — March 18, 2009 @ 1:23 pm

  6. One more thing. Here’s what I use for my GeekTool calendar. It shows the current date on one line, then the modified ‘cal’ display, then my google CLI calendar agenda (upcoming events for the next n days).

    I replaced the “#” with “__” for the current date, as that makes it much faster to identify the current day in the month at a glance.

    date “+ %a, %b %e, %Y” ; cal | sed “s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed ’s/./_/g’) /” | tail -n 7 ; /Library/Frameworks/Python.framework/Versions/2.4/bin/python2.4 /usr/local/bin/gcalcli –nc agenda

    sample output:

    Wed, Mar 18, 2009
    S M Tu W Th F S
    1 2 3 4 5 6 7
    8 9 10 11 12 13 14
    15 16 17 __ 19 20 21
    22 23 24 25 26 27 28
    29 30 31

    Wed Mar 18 1:00pm Appt [etc.]

    Comment by dzurn — March 18, 2009 @ 1:32 pm

  7. [...] have already mentioned this in my previous post, but it is an application that allows you to embed UNIX code, files, or images into your desktop.  [...]

    Pingback by The Apps: | ThemeMyMac — March 24, 2009 @ 6:59 am

  8. How do you get the analog clock like on your desktop? Is that geektool or something else?

    Comment by Chris — March 28, 2009 @ 11:11 pm

  9. Nope, It is an app called Simple Floating Clock.
    http://www.versiontracker.com/dyn/moreinfo/macosx/33388

    Comment by Shaded — March 28, 2009 @ 11:15 pm

  10. another script for weather:
    http://code.google.com/p/sh-weather-rss/
    I’ve modded it for two day forecast:
    curl --silent "http://xml.weather.yahoo.com/forecastrss?p=YOURCITYCODE&u=c" | grep -E '(Forecast:|Low)' | sed -e 's/Forecast://' -e 's///' -e 's///' -e 's///' -e 's///' -e 's///' -e 's///' -e 's///'

    Comment by jeby — March 31, 2009 @ 5:59 pm

  11. Robbie says:
    http://hasseg.org/icalBuddy/
    access your iCal data in geektool. (tasks and events)

    /usr/local/bin/icalBuddy -fs uncompletedTasks
    /usr/local/bin/icalBuddy -fs eventsToday

    Comment by Shaded — April 3, 2009 @ 2:34 pm

  12. For the twitter thing…shouldnt there be something that gets your username and pass? How else would it know what timeline to put? because i just get a blank blue box.

    Comment by Collin — April 10, 2009 @ 2:34 am

  13. any suggestions on how to get the rss feed for lifehacker to work…it doesnt seem to like me

    Comment by Baron — April 12, 2009 @ 4:50 am

  14. I want to say – thank you for this!

    Comment by mark — April 15, 2009 @ 8:46 am

  15. RSS feeds in geektool are over complex (You should really only do it if you like a challenge)… Look into yahoo widgets :)

    Comment by Shaded — April 18, 2009 @ 9:51 pm

  16. Oh yeah, I forgot about that… It is on the twitter ruby gem site… err, also in terminal… Here is what you have to enter in terminal: “twitter add”
    then username and pass.

    Comment by Shaded — April 18, 2009 @ 9:53 pm

  17. Totally reworked. Whew! Amazing post, I’ve never even heard of this app…

    Comment by 3C — April 26, 2009 @ 3:37 am

  18. When enable the SMART script, it cycles my CD drive every 60 seconds. Is there a way to prevent this and only monitor the HD?

    Comment by Clay — April 27, 2009 @ 4:56 pm

  19. I think the SMART status requires running the CD drive… It does it when you open disk utilities. You can make the refresh time longer though… I have mine set to every 2 hours or so…

    Comment by Shaded — April 28, 2009 @ 2:52 am

  20. I haven’t found a working download link for Lynx. They’ve all returned the same error, no such file or directory. Has it been pulled by OSXGnu?

    Comment by Hoff — May 1, 2009 @ 3:08 am

  21. A. http://habilis.net/lynxlet/
    B. http://www.macupdate.com/info.php/id/18252
    Tell me if those don’t work :)

    Comment by Shaded — May 1, 2009 @ 12:06 pm

  22. I got lynx from apple’s download site at http://www.apple.com/downloads/macosx/unix_open_source/lynxtextwebbrowser.html

    Also, I have accumulated some scripts from different places, a few not listed above…here:
    http://stashbox.org/503854/Geektool%20Scripts.txt

    Bruce Phillips at Macscripter also produced this applescript to display either “AC Power” or batt%:
    http://stashbox.org/504266/ACorBattery.scpt

    Comment by Sonny Larsen — May 1, 2009 @ 8:49 pm

  23. Great list, thank you. I do think it needs to be mentioned that GeekTool is not “Leopard ready”. It works ok, but problems do exist, so if you are running Leopard use with caution. Every time I run it I find that after use, when I use DiskWarrior to rebuild disk, there are quite a few issues that need to be resolved all seemed to caused by GeekTool. So be warned. I hope a Leopard update is in the works.

    Comment by J. Stone — May 8, 2009 @ 4:27 pm

  24. ill add these:
    Battery: this one works for me …
    system_profiler SPPowerDataType | grep “remaining” | cut -c 34-38;

    mail: didnt get yours to work…
    echo ‘tell application “Mail” to return unread count of mailboxes of accounts’ | osascript | perl -e “@a=split ‘,’,; foreach (@a) {\$n += \$_}; print \”MaiL : \$n\n\”;”

    Date: i like it when its in a line… i modified it so it just shows the day-nr and marks the current day with [o]…
    cal | sed -e ‘1d;2d’ | sed -e ‘$!N;s/\n/ /’ -e ‘$!N;s/\n/ /’ -e ‘$!N;s/\n/ /’ -e ‘$!N;s/\n/ /’ -e ‘$!N;s/\n/ /’ | sed “s/^/ /;s/$/ /;s/ $(date +%e) /\ [o] /”

    Comment by kn3pp — May 13, 2009 @ 9:05 pm

  25. Does any one know how to get CPU, GPU, Ambient Temp readout using GeekTool? i have not been able to find any info on that

    Comment by Floodek — May 24, 2009 @ 6:53 pm

  26. thx. i use this on my desktop :-) http://picasaweb.google.com/familyalbumy/Osx#5339726052613029890

    Comment by m — May 25, 2009 @ 11:46 am

  27. where you get the wallpaper?

    Comment by yontboy — May 27, 2009 @ 1:01 am

  28. It is a desktoptopia picture, download desktoptopia or browse their photos to find it.

    Comment by Shaded — May 27, 2009 @ 3:27 am

  29. Yeah, there’s nothing on the Twitter gem site pertaining to geektool. I’m in the dark, and I need a flashlight.

    Comment by Thom — June 2, 2009 @ 8:18 am

  30. Twitter gem is not made for geektool. It is something that allows you to tweet, and view tweets from the command line (terminal). However, it also shows up in geektoool. Just install Twitter gem normally and call it in geektool (after setting up your twitter accounts) by typing in “twitter timeline” or something like that.

    Comment by Shaded — June 2, 2009 @ 12:16 pm

  31. The twitter gem seems to have removed the command line interface as it is not compatible with OAUTH at the moment.

    Comment by fnurl — June 7, 2009 @ 5:38 pm

  32. the iphone now transfer his notes with mail.app
    Mail.app ToDo’s are the same we can Display out of iCal (needs icalBuddy and this Shell: /usr/local/bin/icalBuddy -nc uncompletedTasks)

    wouldn’t it be great to display ToDo’s out of Mail in connection with the Mail/iPhone Notes?!
    but i cant figure out how to

    Comment by ham — June 11, 2009 @ 9:24 am

  33. I’m using this to display my last 10 played songs on last.fm uses Lynx, so you’ll have to have that installed

    lynx -dump http://ws.audioscrobbler.com/1.0/user/LAST.FM USERNAME/recenttracks.txt | awk ‘/,/{print substr($0,12,100)};’

    don’t forget to edit the last.fm username

    Comment by Iain Shaw — June 21, 2009 @ 3:14 pm

  34. i have a couple of questions. I have been using geektool for the past 2 days and have not got off of my computer trying to figure somethings out.

    1. for the battery program what i get is “2770″ what does this number mean?

    2. when i download lynx it is a folder with a bunch of components, is this the right file and if so what one do i click on to run?

    3. how do you get the yweather program to work. i saw this on a different site and it gives a future forecast as well as a picture for the current weather.

    4. if you have a script saved in the downloads folder or somewhere how do you put it into geektool to access and run that script?

    5. lastly could you publish a tutorial on how to do rss feeds for geektool. Thanks a ton.

    Thanks a ton, this is a great website. also btw i cant access your rss feed.

    Comment by Chris — June 21, 2009 @ 10:42 pm

  35. never mind, i just got on your website.

    Comment by Chris — June 21, 2009 @ 10:43 pm

  36. Anyone knows how can a script works from Terminal and not from GeekTool?

    Here’s the code:

    dane=”$(wget –secure-protocol=TLSv1 –timeout=3 -t 1 -q -O – https://username:password@mail.google.com/mail/feed/atom –no-check-certificate | grep ‘fullcount’ | sed -e ’s/.*//;s/.*//’ 2>/dev/null)”

    if [ -z "$dane" ]; then
    echo “Error Gmail”
    else
    echo “$dane Unread”
    fi

    Where username and password are changed by your own data.

    Any ideas? Thanks

    Comment by Noelia — June 24, 2009 @ 7:34 am

  37. @Jeby – newbie question.
    when I try your script I am getting in the 1st line and at the end of the 2nd line after today’s forecast another
    and on the 3rd line at the end again
    Thanks for your help.

    Comment by May — June 25, 2009 @ 2:46 pm

  38. @Jeby – newbie question.
    when I try your script I am getting “” in the 1st line and at the end of the 2nd line after today’s forecast another “”
    and on the 3rd line at the end again “”
    Thanks for your help.

    Comment by May — June 25, 2009 @ 2:47 pm

  39. Does anyone know how to get the 0 off of the itunes info script?

    Comment by Cole — June 27, 2009 @ 7:13 am

  40. I’m having a weird problem where i cant get any of the weather scripts to work, in fact any script that has | awk will not work, basically it just shows an empty blue box

    can anyone help? :(

    Comment by Eric — July 4, 2009 @ 6:10 am

  41. I use dashboard, i dont need GeekTool:-)

    Comment by Baba — July 20, 2009 @ 11:46 am

  42. @Baba
    The advantage of Geektool over Dashboard is that it is extremely lightweight and not RAM intensive at all. It’s all the essential info just an expose screen hot spot away, nothing needs to be launched or loaded.

    QUESTION: I REALLY can’t seem to get the time working, nothing will show up… any help appreciated.

    Comment by Paul — July 24, 2009 @ 7:06 am

  43. <time, as in, with a 24 hour clock, no AM/PM

    Comment by Paul — July 24, 2009 @ 7:24 am

  44. Never mind, I figured it out :)

    Comment by Paul — July 24, 2009 @ 7:30 am

  45. Where did you get the wallpaper you have on your desktop? the orange rooster clock one?

    Comment by coolcmanmarve — August 3, 2009 @ 4:28 pm

  46. It is one from desktoptopia. Don’t know the specific.

    Comment by Shaded — August 3, 2009 @ 5:28 pm

  47. Now you can also get the Indian Sensex and Nifty Indices:

    lynx -dump http://content.icicidirect.com/market/market.asp | grep “NIFTY\|SENSEX”

    Comment by Dushyant Ahuja — August 19, 2009 @ 12:24 pm

  48. none of the lynx scripts work at all. its getting me REALLLY frustrated. i installed lynx using the directions provided here and nothing shows up. most of the scripts dont work for me either. specifically the ones with “awk” in the code. its really strange..

    Comment by brian — September 25, 2009 @ 3:59 am

  49. @ brian, I had to include the full path to lynx in geektool, then it worked for me

    Comment by McVries — October 17, 2009 @ 10:25 am

  50. Battery Usage: Working under Snow Leopard 10.6.1

    Content batter.sh:

    #!/bin/sh
    myvar1=`system_profiler SPPowerDataType | grep -e “Full charge capacity (mAh):” | awk ‘{print $5}’`
    myvar2=`system_profiler SPPowerDataType | grep -e “Charge remaining (mAh):” | awk ‘{print $4}’`
    myvar3=`echo $myvar2*100 | bc -l`
    myvar4=`echo $myvar3/$myvar1 | bc -l`
    myvar5=`echo $myvar4 | sed -e ’s/.\{18\}$//’`
    echo “Battery : $myvar5 %”

    Comment by m33x — October 29, 2009 @ 1:09 pm

  51. [...]Russian site[...]

    Pingback by ?????????? GeekTool ????????? ? iTunes — MacRadar — November 3, 2009 @ 4:59 pm

  52. If anyone is interested I have one that displays the calendar in a less standard format. It allows the definition of holidays and control over the color of the output:

    It’s a bit long, it would be easier to just add the geeklet somehow. If anyone is interested though I can post the code.

    Comment by Glen — November 6, 2009 @ 8:00 pm

  53. I say post it Glen… I would love to see it.

    I have question though… is it possible to make the calendar display 1-9 as 01-09 therefore making it so the calendar dates line up to the days properly?

    If not, doesn’t anyone have a suggestion on that… it’s just rather annoying to see them off like they are.

    Comment by Rob — November 14, 2009 @ 11:41 pm

  54. my little 2 cents battery script under snow leopard :

    #!/bin/bash

    maxcap=`ioreg -l | grep Capacity |awk ‘/MaxCapacity/{print $5}’`
    curcap=`ioreg -l | grep Capacity |awk ‘/CurrentCapacity/{print $5}’`

    curcap=`echo $curcap*1000|bc`
    proc=`echo $curcap / $maxcap |bc`;

    len=`echo ${#proc}`;

    proc_num=${proc:0:3}
    proc_dec=${proc:3:4}

    proc_num_len=`echo ${#proc_num}`;

    if [ $proc_num_len == "3" ]; then
    if [ $proc_num != "100" ]; then
    proc_num=${proc:0:2}
    proc_dec=${proc:2:3}
    fi
    fi

    echo $proc_num.$proc_dec%

    IOREG -nAppleSmartBattery | grep Charging | awk ‘{print “Charging : “$5}’
    IOREG -l -w 0 “AppleSmartBattery” | grep ExternalConnected | awk ‘{print “AC Power: ” $5}’

    Comment by Nag — November 30, 2009 @ 6:11 pm

  55. now if you can only make one for Google Voice that works behind a firewall.

    Comment by Tschäff The Unholy — December 3, 2009 @ 10:55 pm

  56. [...] http://thememymac.com/2009/geektool/geektool-all-the-scripts-i-could-find-explained-for-beginners/ [...]

    Pingback by My Geektool Configuration « Matthew J. Goff — December 17, 2009 @ 9:52 pm

  57. [...] Theme My Mac. Smoking Apples. Gallery of GeekTool desktops. [...]

    Pingback by » GeekTool Desktop — December 19, 2009 @ 6:58 pm

  58. [...] Jeder von uns benutzt sicher Wallpaper auf seinem Desktop/Schreibtisch, egal ob PC oder Mac, um seinen Schreibtisch einfach ein bisschen anders zu gestalten als Otto Normal User. Ich selbst bin vor einiger Zeit auf Geektool gestossen. Mit diesem Tool kann man seinen Schreibtisch (Mac) noch besser gestalten. So kann man z.B. das aktuelle Datum, seine letzten Emails, seine Things Todo Liste, Adium Nachrichten das Wetter und viele andere nette Sachen anzeigen lassen. Um sich Inspirationen für einen eigenen Schreibtisch mit Geektool zu holen, könnt ihr hier ein paar sehr schöne Geektool Wallpaper Beispiele sehen auf der es auch Links zu den jeweiligen Geektool Scripts gibt. Auf dieser Seite gibt es eine Erklärung für die Anfänge a la GeekTool for beginners. [...]

    Pingback by Geektool und Dein Schreibtisch beginnt zu leben Software Geektool, Schreibtisch, Wallpaper, Beispiele, Inspirationen, Wetter, Nachrichten, Links — January 3, 2010 @ 1:14 pm

  59. Is there a way to extract images from an RSS feed and have it display them?

    Comment by aphid — January 4, 2010 @ 9:00 pm

  60. We’re trying to build a community where people can share their GeekTool setups over at http://www.macosxtips.co.uk/geeklets

    People can download and contribute the “geeklet” files that GeekTool 3 now uses. It’s a great place if you are looking for some new scripts or if you want to share your cool new setup.

    Comment by Matt — January 12, 2010 @ 2:47 am

  61. I cant get any of the scripts to work for my computer. Im running geektool 3 on snow leopard with a macbook pro, anyone know why? all i can get to work is “uptime”

    Comment by Peter — February 11, 2010 @ 10:45 pm

  62. Thanks for a great post on the subject, it is very user-friendly.

    I was wondering if it’s possible to format the hour (%I) to one digit when the time is between 0-9 o’clock (So it says 1:10 instead of 01:10 [am] but still writes 13:10, in a 24-hour format)?

    Comment by Christian — March 15, 2010 @ 12:18 am

  63. Hey thanks for the awesome stuff, the only problem is that I have troubles working it:

    I really want battery power and weather forecast on. I’ve been having troubles with this (as nothing seems to work). I’m living in Holland so that maybe some issues with the weatherforecast. biggest problem with the battery is this: some sites say I should create a .sh file. But when I try the program won’t let me. In which program should I do this, does anybody have anything simpler? Also how do i work .scpt files?

    Thanks!

    Comment by crossk1ll — March 31, 2010 @ 5:12 pm

  64. [...] A manual created by Shaded of MacThemes (It’s nicer than what i’ve got here, so dig in) [...]

    Pingback by A Dark Theme for Snow Leopard « Freethellamas's Blog — March 31, 2010 @ 11:33 pm

  65. My battery sign comes up with .%. I don’t get a number. I also can’t get the disk usage either. It may be because i’m running snow leopars

    Comment by William — April 21, 2010 @ 12:47 pm

  66. [...] http://thememymac.com/2009/geektool/geektool-all-the-scripts-i-could-find-explained-for-beginners/ [...]

    Pingback by Geektool… personnalisation du bureau ultime ?! « Gecko Splinter — May 2, 2010 @ 8:22 am

  67. Does anyone know how I would be able to display torrent downloads from Vuze (or other clients)?

    Comment by Eric — May 12, 2010 @ 4:23 am

  68. [...] MacThemes Geektool thread How to Geektool your Mac to Awesomeness Mega Roundup of Geektool Scripts Geektool for beginners Reply With Quote   + Reply to [...]

    Pingback by Show your OS X Desktop! — May 26, 2010 @ 6:57 am

  69. [...] the link here and it gives you excellent screenshot [...]

    Pingback by Geektool: Virtual Desktop Enhancement « வழிப்போக்கன்-Mac OSX — July 24, 2010 @ 9:25 am

  70. You should try all these in Terminal first to find if anything is wrong and fix it

    Comment by Geeky Geek — July 25, 2010 @ 9:09 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress