diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-08-02 11:19:36 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-08-02 11:19:36 +0200 |
commit | f5d623a3c1ec01e855c3bac178c28ccc92956a35 (patch) | |
tree | 9e4f88ca0e54d35df2af8c244baef74f221bdede | |
parent | 197a3c7060945d422ccb1c3504bfda93791ea380 (diff) |
feature: open org-roam-ui by default
-rw-r--r-- | org-roam-ui.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index aca7e40..17952c8 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -97,6 +97,11 @@ This can lead to some jank." :group 'org-roam-ui :type 'boolean) +(defcustom org-roam-ui-open-on-start t + "Whether to open your default browser when org-roam-ui-mode launces." + :group 'org-roam-ui + :type 'boolean) + (defvar org-roam-ui--ws-current-node nil "Var to keep track of which node you are looking at.") (defvar oru-ws nil @@ -116,6 +121,8 @@ This serves the web-build and API over HTTP." (setq-local httpd-port org-roam-ui-port) (setq httpd-root org-roam-ui/app-build-dir) (httpd-start) + (when org-roam-ui-open-on-start + (browse-url "http://localhost:35901")) (setq org-roam-ui-ws (websocket-server 35903 |