Easy Calendar navigation with Alfred

This past year, like many other “suddenly remote” workers, I found myself using digital calendars even more than usual. Mainly, trying to block some focus time before another “X sync” splits my afternoon into two chunks too small to do any deep work, but also looking for any documents linked via attached notes (yes, the documents everyone was supposed to read before the meeting), and, of course, panic-scanning the event notes for the elusive Zoom ID so I can join within that “3-minute late” sweet spot.

The macOS Calendar app doesn’t make any of this particularly easy: in Apple’s typical fashion, current meeting’s notes and relevant URLs are neatly tucked away in the details popup, and I often have to scroll the popup contents to find the right field. I strongly believe that “searching is typing” and any time you’re visually scanning the content on the screen is a wasted an opportunity to let the computer do it for you. Naturally, once I’ve recognized this inefficiency, I got an itch to resolve it.

Unsurprisingly, Alfred came to the rescue. I wrote a small CLI program that reads calendar data from EventKit and then used Alfred’s Script Filters to give it an ergonomic, search-driven UI. Now, within a keystroke, I have an option to:

  • jump to the current or upcoming event in the Calendar app;
  • quickly open any link attached to current or upcoming events without even opening the Calendar app.

The first workflow displays events happening between now and 24 hours from now in chronological order and includes a “Jump to Today” fallback option to open the Today’s view in Calendar.

A screenshot of Jump to event shortcut

The latter extracts every link mentioned in notes, URL, or location fields of every event happening between now and three hours from now, making them easily accessible.

A screenshot of Jump to link shortcut

This workflow has changed the way I interact with my calendar. I rarely even have to open the app: nowc gives me the agenda and nowl gets me to the right Zoom. Aside from impressing some coworkers during screen sharing sessions, another unexpected benefit was how this workflow made OmniFocus time blocking at least twice better. When doing my daily review of current projects, I often drag tasks from OmniFocus onto the calendar, which creates back-linked time blocks. Typically, these backlinks are only marginally useful, but now that they’re just a keystroke away, it’s my favorite way to navigate to the current task to mark it as complete or access its metadata.

A screenshot of Jump to link shortcut with an OmniFocus link

If you think these automations could be useful for you, too, they are available publicly as a part of my macos-automation GitHub repo and anyone is welcome to build them from source following the provided instructions. Use them at your own risk! This post is to give you ideas of what automations are possible with Alfred and a a few lines of Swift. The rest is left as an exercise to the reader.