A messy way to search Obsidian from anywhere in your OS.
This AppleScript-based solution is rather messy still but works so far. If possible for me I intend to make it work a bit smoother in the future.
Download the AppleScript from just above.
In the first couple of lines there is minor personalisation required:
- Edit this path to point to your Obsidian Vault:
set chosenFolder to "Macintosh HD:Users:Path:to:Vault" as alias
- Replace "Vault" with the name of your Vault right here:
set vaultName to "Vault"
Using Alfred, you can simply search for the file name of the script, press enter and start it from anywhere.
Hammerspoon is a powerful MacOS automation bridge, written lua. Don't worry, you don't even need to know any lua to trigger Shard Search with a hotkey from anywhere.
- Download Hammerspoon via it's website.
- Open the Hammerspoon application. It will prompt you to create a
init.lua
file. - Replace the
init.lua
with the file from above. It is supposed to live in~/.hammerspoon/init.lua
- Open the with a text editor (like Atom)
- Modify the hotkey if you'd like to:
hs.hotkey.bind({"cmd", "alt"}, "O"
(default iscmd + alt + o
) - Edit this path to point to your Obsidian Vault:
set chosenFolder to "Macintosh HD:Users:Path:to:Vault" as alias
- Replace "Vault" with the name of your Vault right here:
set vaultName to "Vault"