The immense original feature in macOS Monterey
One in all doubtlessly the most tantalizing aspects in doubtlessly the most up-to-date annual starting up of macOS used to be the introduction of Siri Shortcuts to the desktop for the important time. This isn’t the important automation resolution to be offered to OS X / macOS: forward of, it used to be fashioned to craft custom workflows and automations in Automator.app, or write custom AppleScript / OSAscript scripts.
Now, it is possible to automate virtually one thing else now now not handiest within the macOS, nonetheless the Apple ecosystem in fashioned:
On this post I’ll also demo easy systems to automate one thing else within the Apple ecosystem from the comfort of GNU Emacs, the field’s most extensible editor.
Integrating with Shortcuts
The Shortcuts CLI
While the original Shortcuts app is the foremost space for increasing and sharing Shortcuts, Monterey also shipped with a brand original CLI instrument very with out difficulty known as
shortcuts. To illustrate, you will be ready to flee any Shortcut straight away out of your shell:
shortcuts flee SampleShortcut
Shortcuts URL contrivance
macOS also exposes a brand original URL contrivance precisely named
shortcuts:// as described in the legit documentation.
To illustrate, to begin the editor for a Shortcut known as
SayDogg, it may possibly perchance possibly perchance presumably leer adore
I surely beget recently created a brand original Emacs equipment known as siri-shortcuts.el, which helps you to:
- Interactively flee Siri Shortcuts with auto completion
- Commence and search the Shortcuts gallery (there may possibly be an starting up instruct connected to head looking out)
- Commence an editor for a Shortcut
- Employ easy helper functions to rep your get dangle of automations and heaps more and heaps more
To illustrate, let’s create a easy automation the set when opening an Elixir file / mission, the colour of a shapely light strip in HomeKit will switch to purple and show a notification.
Subsequent, we add the following line to our init file (e.g.
(add-hook 'elixir-mode-hook (lambda () (siri-shortcuts-flee "SetLightStripToPurple")))
Now, when Elixir mode is activated, this can trigger the Shortcut!
Obviously, right here is comely the tip of the iceberg of what is doable with Shortcuts. I’m enraged to ogle what suave automations you will give you, and feel free to fragment them with me within the comments or on Twitter!
Emacs Logo – By Amin Bandali – https://emacsconf.org/2020/, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=97319543