Skip to content

A collection of my macOS automation scripts (Alfred Workflows, AppleScript, and JXA)

Notifications You must be signed in to change notification settings

temochka/macos-automation

Repository files navigation

macOS automation scripts

A collection of my macOS automation scripts (Alfred workflow, AppleScript and JXA). To compile, run:

make all

AlfredProcess

A mega-workflow for Alfred that encompasses all of my custom automations. See its own README for details. To build just the workflow, run:

make alfred-workflow

Then install the workflow via:

open target/Process.alfredworkflow

Hotkeys

I use an app I built called Anykey to assign hotkeys to some of the automations. The Anykey configuration file is automatically built from individual launchers.

Calendar Icon

Calendar

Jump to upcoming event

Type nowc into Alfred to get a list of current and upcoming events on your calendar and quickly open them in Calendar app.

Jump to event screenshot

Jump to relevant link

Type nowl into Alfred to get a list of links mentioned in current and upcoming events’ descriptions. Useful for quickly joining Zoom calls.

Jump to event screenshot

Link to event

Insert a link to an event via Alfred search. Creates a bi-directional link via Hook app.

Contacts

Open in Alfred

Contacts app is awkward to navigate with the keyboard so this is convenient for quickly copying fields to clipboard.

Link to Contact

Insert a link to another contact via Alfred search. Creates a bi-directional link via Hook app.

Finder

Add/edit tags

Trigger the "Add/Edit tags" toolbar action for the selected file(s). The only way to assign a keyboard shortcut to this action, AFAIK.

Mail

Copy Mail message URL

Copies local URLs to messages in Apple Mail for quick referencing. URLs look like below and work both on macOS and iOS:

message:https://%[email protected]%3e

Sticky Note Icon

Safari

Open Highlighted Link

Safari doesn’t automatically focus elements highlighted via search by page (like Chrome or Firefox). However, it can be done with a bit of AppleScript. Read more on my blog.

Copy GitHub issue/PR link

GitHub allows linking to issues and PRs using the following short format: owner/repo#issue. I’m not aware of an easy way to quickly produce a link in this format. This script closes this gap for me.