macstories / obsidian-shortcut-launcher

Trigger shortcuts in Apple's Shortcuts app from Obsidian with custom commands.
MIT License
187 stars 10 forks source link

Run shortcut by clicking link in file #3

Closed campjacob closed 2 years ago

campjacob commented 2 years ago

Feature Request

I'm not sure if this would be possible, but I could see it as useful. So, for example, when I heard you talking about the launcher on Connected, my first thought would be that this would be a great way to launch a timer or something like that.

Having a link that I could click or some way to embed the command into one of my specific files so when I open the file, I could click it and run my shortcut would be great.

finnvoor commented 2 years ago

If you want to run a shortcut using a link you can simply insert a link using the shortcuts url scheme, shortcuts://run-shortcut?name=[name]&input=[input]&text=[text]

If you want the link to use the input methods of this plugin then I think what you can do is install the obsidian-advanced-uri plugin, which adds links for running obsidian commands. You can create a obsidian:// link to run one of the shortcut launcher commands and it should receive the inputs you specify.

finnvoor commented 2 years ago

You can also run commands on a button press using the Obsidian buttons plugin.

campjacob commented 2 years ago

Thank you so much!