I ran into a line of posts the other day about customizing Mac desktops. There were quite a few interesting ideas but the ones that stuck out for me were the people making use of Geek Tool.
Geek Tool is an macOS preference pane that allows you to place pretty much anything on the desktop. And what it places on the desktop can be easily formatted. I took one of the designs and extended it slightly to create this:
This time/date/weather display is updated dynamically on the desktop and uses very little CPU.1
Each element in the display is a separate shell command. The elements are:
|Element||Shell Command||Font||Location||Size||Update Period (sec)|
|The day||date +%A||Helvetica, Regular, 27point with drop shadow||10x, 727y||200w x 40h||60|
|The month||date +%B||Helvetica, Regular, 36point with drop shadow||10x, 750y||200w x 50h||60|
|The day of the month||date +%d||Helvetica, Regular, 64point with drop shadow||210x, 720y||100w x 80h||60|
|The time||date "+%I:%M"||Helvetica, Bold, 72point with drop shadow||20x, 780y||200w x 80h||10|
|am/pm||date +%p||Helvetica, Regular, 48point with drop shadow||210x, 785y||100w x 70h||10|
|The temperature||<bin>/weather.rb -t||Helvetica, Bold, 18point||20x, 855y||70w x 25h||300|
|The weather||<bin>/weather.rb -d | fmt -w 40||Helvetica, Regular, 10point||90x, 855y||210w x 38h||300|
|When the weather was updated||<bin>/weather.rb -w||Helvetica, Regular, 8point||35x, 878y||64w x 25h||300|
The <bin> in the weather commands is the full path to the directory where you place the weather.rb script. That script is written in Ruby and calls the Weather Underground for the weather information. It needs to be modified so it’s location matches yours. You can download the script from here.
Download the script and replace <your-state> with your two character state, e.g., PA. Replace <your-city> with your Weather Underground recognized city, e.g., West_Chester. You’ll have to play with the Weather Underground site to find your city name. Save the altered script to your bin directory, e.g., /Users//bin. If you don’t have a bin directory, create one. Make the script executable by typing ‘chmod +x /Users/bin/weather.rb’. Test the script by running it - ‘/Users//bin/weather.rb -d’. Once you have it working, you can use it in Geek Tools.
Again, the URL “http://rss.wunderground.com/auto/rss_full/<your-state>/<your-city>.xml?units=english” portion of the script will need to be modified to match your location. Test the URL in your browser to find the right one for your version of the script.
The weather script stores the information it pulls down for 30 minutes (1800 seconds). Defined on this line:
The delay is necessary to keep from pulling the information down repeatedly for each element in the display. You don’t need to change this unless you want the delay to be different.
 There are some limits to Geek Tool formatting. You’ll notice that the weather font looks a little ragged. The only way to get Geek Tool to blend text is to give it a shadow. But a shadow on such a small font looks terrible.
Categories: Mac ComputerGeek Tool, Mac Computer, macOS