Skip to main content
Marc Jenkins

My GeekTool F1 desktop

With the new Formula One season about to get underway, I thought I’d write about the F1 desktop I created using GeekTool. It’s pretty simple: it just displays the number of days until the next race, and at which track.

I used the Ergast Developer API, which allows us to call a json file with information about the next race. A few simple PHP scripts are used to display the information.

GeekTool allows us to run PHP scripts (or Bash scripts, Ruby, etc.) and display the contents on our desktop.

Here’s the end result:

f1_desktop

For this tutorial, you’ll need:

  • Mac OS 10.6+
  • GeekTool
  • A nice desktop image (I used one from here)

The first step is to go to this repository and copy the 3 PHP files (f1_api.php, f1_days_until_race.php and f1_next_race.php) to a location on your HD. I saved them in ~/Sites/f1-geektool-desktop/, but it could be your MAMP folder or Documents. Make a note of where it’s saved.

Next, open GeekTool and drag the Shell icon to the desktop. A properties toolbar will open. In the Command box, enter the following:

php ~/Sites/f1-geektool-desktop/f1_next_race.php

Make sure you use the correct path. Enter a sensible refresh rate (I chose 3600s) and set an appropriate font and colour.

Now, create another Geeklet by dragging another Shell icon to your desktop. In the Command box, enter:

php ~/Sites/f1-geektool-desktop/f1_days_until_race.php

Again, set the refresh rate, font and colours.

Play around with the layout until you’re happy and that’s it! If you know PHP, you can easily modify the scripts to pull more information from the API.

Enjoy the 2014 season!