List and run shortcuts from the Shortcuts app
Separate from this extension, 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. You can use this action to call functions defined in your init.lua
or to just execute chunks of Lua.
Your functions/chunks can return text, which will be returned by the action in Shortcuts.
Signature | hs.shortcuts.list() -> [] |
---|---|
Type | Function |
Description |
Returns a list of available shortcuts |
Parameters |
|
Returns |
|
Source | extensions/shortcuts/libshortcuts.m line 16 |
Signature | hs.shortcuts.run(name) |
---|---|
Type | Function |
Description |
Execute a Shortcuts shortcut by name |
Parameters |
|
Returns |
|
Source | extensions/shortcuts/libshortcuts.m line 50 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.shortcuts.html