Web log de Serge Boisse
On line depuis 1992 !
On peut faire des recherches dans Obsidian depuis chrome : (si on a installé Obsidian bien sûr !)
cf. https://medium.com/@gareth.stretton/obsidian-control-from-chrome-1ba27c5ef84b
exemple ; taper dans la barre de recherche de Chrome
obsidian://search?vault=TESTLOCAL&query=Amis
chrome essaie d'ouvrir l'application locale obsidian
The technique is a combination of Chrome’s Site Search and Obsidian’s URI protocol.
In Chrome, you can add our own search engine. You specify a keyword, say “youtube” and a URL “https://www.youtube.com/results?search_query=%s”. Once this is configured, you can quickly perform a search in the address bar. You simply type the keyword, press tab, enter your search term and hit enter. Chrome will replace the ‘%s’ in the URL then visit the address.
Rather than provide a website we use an Obsidian URI. For example, to search your vault you would use the URI: obsidian://search?vault=my%20vault%20name&query=%s
.
Below are the steps to configure Chrome to have Obsidian site search commands and also to allow Chrome to Open Obsidian without confirming each time.
Add Custom Site Searches
Open Settings
Search settings for ‘site search’
Add site search for each Obsidian command
Example site search: Search Obsidian
Below are my site search commands. You will need to change the vault name (“my_vault”) to your vault name. You can change the shortcuts too.
Purpose: Search vault
Search Engine: Obsidian - Search
Shortcut: obs
URL: obsidian://search?vault=my_vault&query=%s
Purpose: Create a new note
Search Engine: Obsidian - Create Note
Shortcut: obn
URL: obsidian://new?vault=my_vault&silent=true&name=%s
Purpose: Save a link to a note
Search Engine: Obsidian - Save Link
Shortcut: obl
URL: obsidian://new?vault=my_vault&silent=true&name=Links&append=true&content=%s%0D%0A
Purpose: Save a TODO to a note
Search Engine: Obsidian - Save TODO
Shortcut: obn
URL: obsidian://new?vault=my_vault&silent=true&name=TODOs&append=true&content=-%20[%20]%20%s%0D%0A
If you have spaces in your vault name, replace these with ‘%20’. Likewise, ‘%2F’ for forward slashes, e.g. ‘/’.
Always allow Chrome to open Obsidian
For security reasons, Chrome asks you before opening Obsidian (and most other applications). For example, on Linux the popup confirmation looks like this…
Chrome Popup to Confirm opening Obsidian
This can be annoying. However, Chrome can be configured to Open Obsidian without asking. Below are the instructions for Mac and Linux, and a link for Windows (which I haven’t tried yet).
On Mac…
defaults write com.google.Chrome URLAllowlist -array 'obsidian://*'
On Linux…
sudo mkdir -p /etc/opt/chrome/policies/managed/
echo '{"URLAllowlist":["obsidian://*"]}' | sudo tee /etc/opt/chrome/policies/managed/managed_policies.json
On Windows…
I believe you need to edit the Windows registry. Good luck!
EDIT: u/holgerkrumm suggests that if you use Windows + Edge then these instructions will work for you!
page créée le 18/03/2025 à 15:09
modifiée le 02/06/2025 à 15:20
Commentaires (0) :
Page :Ajouter un commentaire (pas besoin de s'enregistrer)
En cliquant sur le bouton "Envoyer" vous acceptez les conditions suivantes : Ne pas poster de message injurieux, obscène ou contraire à la loi, ni de liens vers de tels sites. Respecter la "netiquette", ne pas usurper le pseudo d'une autre personne, respecter les posts faits par les autres. L'auteur du site se réserve le droit de supprimer un ou plusieurs posts à tout moment. Merci !Ah oui : le bbcode et le html genre <br>, <a href=...>, <b>b etc. ne fonctionnent pas dans les commentaires. C'est voulu.