mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
(docs): Add graph setup documentation for MacOS (#146)
Thanks @naistran for instructions, and @leothelocust and @seandavi for discussion and confirmation
This commit is contained in:
@ -5,7 +5,7 @@ The gist of the setup is setting up a Bash script to trim off the
|
|||||||
`roam://` prefix from the link, causing the desktop application to
|
`roam://` prefix from the link, causing the desktop application to
|
||||||
call `emacsclient path/to/org-roam-file.org`.
|
call `emacsclient path/to/org-roam-file.org`.
|
||||||
|
|
||||||
## Setting Up for Linux
|
## Linux
|
||||||
|
|
||||||
Create a desktop application. I place mine in
|
Create a desktop application. I place mine in
|
||||||
`~/.local/share/applications/roam.desktop`:
|
`~/.local/share/applications/roam.desktop`:
|
||||||
@ -37,3 +37,42 @@ running in your shell:
|
|||||||
```bash
|
```bash
|
||||||
xdg-mime default roam.desktop x-scheme-handler/roam
|
xdg-mime default roam.desktop x-scheme-handler/roam
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Mac OS
|
||||||
|
|
||||||
|
One solution to this, recommended in [Issue
|
||||||
|
#115](https://github.com/jethrokuan/org-roam/issues/115), is to use
|
||||||
|
[Platypus](https://github.com/sveinbjornt/Platypus). Here are the
|
||||||
|
instructions for setting up with Platypus and Chrome:
|
||||||
|
|
||||||
|
1. Create an executable `launch-emacs.sh` script:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
/usr/local/bin/emacsclient --no-wait "${1#*:}"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install and launch Platypus (with [Homebrew](https://brew.sh/)):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
brew cask install playtpus
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Playtpus settings:
|
||||||
|
|
||||||
|
- App Name: `OrgRoam`
|
||||||
|
- Script Type: `env` and `/usr/bin/env`
|
||||||
|
- Script Path: `/path/to/your/launch-emacs.sh`
|
||||||
|
- Tick Accept dropped items and click Settings
|
||||||
|
- Tick Accept dropped files
|
||||||
|
- Tick Register as URI scheme handler
|
||||||
|
- Add `roam` as a protocol
|
||||||
|
- Create the app
|
||||||
|
|
||||||
|
To disable the "confirm" prompt in Chrome, you can also make Chrome
|
||||||
|
show a checkbox to tick, so that the `OrgRoam` app will be used
|
||||||
|
without confirmation. To do this, run in a shell:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
defaults write com.google.Chrome ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user