Run Lua in ShortcutsEvan Travers
Hammerspoon provides an action for use in the Shortcuts app. The action is called "Execute Lua" and if it is passed a text block of valid Lua, it will execute that Lua within Hammerspoon.
How in the world have I not read this paragraph before? 🤯 I still stand by my decision to have Headspace work via URLs, but this feature unlocks a whole bunch of big-boy automation.
Something I've missed in my transition from 100% Hammerspoon to driving Shortcuts via Raycast is that my old version would close every running app when I ran the space.
I like the practice of knowing that I'm "laying down all my work" at the end of the day, but I haven't found a way to find and kill running application using pure Shortcuts. Using this newly discovered Lua action I can now directly copy my old code into the Shortcut… hey presto!
* scurries off to rewrite a bunch of automation *
2023-05-16 13:12:39 -0500Update tag
2023-04-05 09:35:52 -0500Lua in shortcuts