This is a set of technical resources for network engineers and system administrators; includes whois and traceroute.
GeekTool is a great app for customizing your Desktop and making your workspace your own, and we’ve already covered some of the ways you can put GeekTool to work. Today we’re going to look at how to put a calendar on your Desktop with GeekTool, and because GeekTool is all about customization, we’ll talk about how to get just the calendar you want. GeekTool is a Mac OSX Application (or System Preference Pane) that lets you display various kinds of information on your desktop via 3 default plug-ins.
42 Astoundingly Useful Scripts and Automations for the Macintosh
2019 August 23/6:00 AM
Work faster and more reliably. Add actions to the services menu and the menu bar, create drag-and-drop apps to make your Macintosh play music, roll dice, and talk. Create ASCII art from photos. There’s a script for that in 42 Astounding Scripts for the Macintosh.
- Amazon•

Most clocks show time in a complicated display of day, month, year, hours, minutes, and seconds. But how often have you just wanted to know whether the time is today, yesterday, or last week? This Python-based GeekTool geeklet will display the relative date on your desktop.
[toggle code]

- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import optparse, datetime
- days = ('yesterday', 'today', 'tomorrow')
- parser = optparse.OptionParser('%prog')
- parser.add_option('-d', '--day', type='choice', choices=days, default='today')
- (options, slugs) = parser.parse_args()
- today = datetime.datetime.fromordinal(datetime.date.today().toordinal())
- future20 = datetime.datetime.now() + datetime.timedelta(minutes=20)
- oneDay = datetime.timedelta(days=1)
- oneWeek = datetime.timedelta(days=7)
- if options.day 'today':
- date = today
- elif options.day 'tomorrow':
- date = today + datetime.timedelta(days=1)
- elif options.day 'yesterday':
- date = today - datetime.timedelta(days=1)
- else:
- date = future20
- #the future
- if date >= today:
- if date future20:
- print '20 minutes into the future'
- elif date today:
- print 'Today'
- elif date <= today + oneDay:
- print 'Tomorrow'
- elif date <= today + oneWeek:
- print 'Next', date.strftime('%A')
- elif (date.year today.year and date.month != today.month) or (date.year today.year+1 and date.month <= today.month):
- print 'Next', date.strftime('%B')
- else:
- timeToFuture = date - today
- print 'In', timeToFuture.days, 'Days'
- if date future20:
- #the past
- elif date >= today - oneDay:
- print 'Yesterday'
- elif date >= today - oneWeek:
- print 'Last', date.strftime('%A')
- elif (date.year today.year and date.month != today.month) or (date.year today.year-1 and date.month >= today.month):
- print 'Last', date.strftime('%B')
- else:
- timeToPast = today - date
- print timeToPast.days, 'Days Ago'
Geektool Scripts 2020
I set the geeklet to refresh every 60 seconds to ensure that the relative clock is always correct.
If the current time is today, the script displays “today”. If it’s yesterday or tomorrow, then it displays that. If it’s within one week in either direction, it displays “next” or “last” and then the weekday name. And if it’s within the last or next twelve months, it does the same for the month name. Otherwise, it just says how many days to or since the current date.
The script uses Python’s datetime and timedelta classes to make these checks. I would have liked to use datetimes, dates, and timedeltas, but dates and datetimes are very different classes; there’s a datetime.date() method, for example, but no date.datetime(), and the datetime.today() method is really just datetime.now().
The timedelta class is used to create, basically, a time range to subtract from or add to a datetime; and when you subtract one datetime from another datetime, the result is a timedelta of the difference.
If you’d rather see how tomorrow relates to the current time, or how yesterday relates to the current time, specify “tomorrow” or “yesterday” to the --day option on the command line.
I haven’t had any need to display times, so I haven’t programmed it. If you end up needing times, however, it shouldn’t be difficult to extend the pattern I’ve started here to go down to hours or even minutes or seconds.
Keep this on your Desktop and you’ll never forget what today is!
Geektool Mac
- GeekTool
- “GeekTool is a System Preferences module for Mac OS 10.5. It lets you display on your desktop different kind of informations, provided by 3 default plugins.” The plugins let you monitor files (such as error logs), view images (such as live graphs), and display the results of command-line scripts.
More April Fool’s
Geektools
- I’m stuck in a computer program; now what?
- “Help, I’ve been sucked into a computer program! What do I do?” Handy tips for how to successfully extricate yourself from the most hopeless of spaghetti code, the inner universe loop.
- Can I legally use Gary Gygax’s name for my son?
- It’s probably best to talk to a lawyer, or just avoid the issue altogether. Gaming copyright is a very complex issue, and best left to the experts or those with deep pockets. Have you considered naming him Sue?
- Secular Humanist Pantheon
- The Secular Humanist cult, while often oppressed, attracts intelligent, creative worshippers who subscribe to a rich and storied mythology. It will make a great addition to your role-playing game alongside more commonly-role-played mythologies such as Christianity, Buddhism, and Bokonism.
Geektool Scripts
More GeekTool
- icalBuddy and eventsFrom/to
- Ali Rantakari’s icalBuddy has an error in the documentation for the “eventsFrom/to” command-line option. Rather than “tomorrow at time” use “time tomorrow”.
- Apple Mail on the Desktop with GeekTool
- Here’s a simple AppleScript to use with GeekTool to put your inbox on the Desktop.
- GeekTool, TaskPaper, and XML
- A script to convert a TaskPaper file to XML so as to filter it for specific tags and display the results on the Desktop.
- GeekTool, Perl, and ANSI color codes
- GeekTool is a great way to display the results of little scripts on your desktop. Using ANSI color codes can make those scripts even more useful. You can also change the status of the status button from “success” to “failure” depending on your script’s exit code.
- Command-line mail on OS X: re-alpine and Geektool
- If you do a lot of automated command-line scripts, you probably also generate a lot of mail to /var/mail. OS X only has the mail program built-in, and its GUI mail client hasn’t been able to add simple mail accounts since about OS X 10.2. Alpine can get you a better mail client, and Geektool can provide better notices.
Geektool Moving Images
More Python
Geektool Tynsoe
- Goodreads: What books did I read last week and last month?
- I occasionally want to look in Goodreads for what I read last month or last week, and that currently means sorting by date read and counting down to the beginning and end of the period in question. This Python script will do that search on an exported Goodreads csv file.
- Test classes and objects in python
- One of the advantages of object-oriented programming is that objects can masquerade as each other.
- Timeout class with retry in Python
- In Paramiko’s ssh client, timeouts don’t seem to work; a signal can handle this—and then can also perform a retry.
- Percentage-based random tables
- Our current random item generator assumes that each item shows up as often as any other item. That’s very OD&D-ish. But AD&D uses percentage dice to weight toward some monsters and items more than others.
- Parsing JSKit/Echo XML comments files
- While I’m not a big fan of remote comment systems for privacy reasons, I was willing to use JSKit as a temporary solution because they provide an easy XML dump of posted comments. This weekend, I finally moved my main blog to custom comments; here’s how I parsed JSKit’s XML file.
- 28 more pages with the topic Python, and other related pages
