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!

Published on
Tagged:

Related articles

Join hundreds of freelancers and web professionals who get my monthly newsletter about freelancing, productivity, and more.

    Unsubscribe in one click. I'll never share your email address.

    Where to go next

    1. If you want to get my writing delivered to your inbox, subscribe to my newsletter. I only send out one email per month and you're free to unsubscribe at any time.

    2. If you'd like to discuss working together, I'd love to hear from you. Even if you don't have a specific project in mind, but would like to start the relationship for when you do, go introduce yourself.

    3. If you're on the socials, you can follow me on Twitter @marcjenkins or send a request on LinkedIn.