From f5d623a3c1ec01e855c3bac178c28ccc92956a35 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 2 Aug 2021 11:19:36 +0200 Subject: feature: open org-roam-ui by default --- org-roam-ui.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'org-roam-ui.el') 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 -- cgit v1.2.3