diff options
author | Thanos Apollo <[email protected]> | 2024-12-17 05:31:45 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-12-17 05:32:17 +0200 |
commit | d1ef43dd7567228207732e5a4ce0c6f9475fca28 (patch) | |
tree | 53cd62628ad0fc35fc87b2fdaae8a88e8f14d89a /org-roam-ui.el | |
parent | 5ac74960231db0bf7783c2ba7a19a60f582e91ab (diff) |
Decouple org-roam: Add custom funcs to get data from.
* Add custom functions to decouple org-roam-ui from org-roam.
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r-- | org-roam-ui.el | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index e13349b..07e276b 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -40,26 +40,19 @@ (defgroup org-roam-ui nil "UI in Org-roam." - :group 'org-roam + :group 'org-roam-ui :prefix "org-roam-ui-" :link '(url-link :tag "Github" "https://github.com/org-roam/org-roam-ui")) -(defvar org-roam-ui-root-dir - (concat (file-name-directory - (expand-file-name (or - load-file-name - buffer-file-name))) - ".") - "Root directory of the org-roam-ui project.") - -(defvar org-roam-ui-app-build-dir - (expand-file-name "./out/" org-roam-ui-root-dir) - "Directory containing org-roam-ui's web build.") +(defcustom org-roam-ui-directory org-gnosis-dir + "Directory of org-roam-ui notes." + :group 'org-roam-ui + :type 'directory) -;; TODO: make into defcustom -(defvar org-roam-ui-port - 35901 - "Port to serve the org-roam-ui interface.") +(defcustom org-roam-ui-port 35901 + "Roam UI Port." + :group 'org-roam-ui + :type 'number) (defcustom org-roam-ui-sync-theme t "If true, sync your current Emacs theme with `org-roam-ui'. @@ -68,6 +61,11 @@ Ignored if a custom theme is provied for variable 'org-roam-ui-custom-theme'." :group 'org-roam-ui :type 'boolean) +(defcustom org-roam-ui-dailies-directory org-gnosis-journal-dir + "Dailies/Journaling directory." + :group 'org-roam-ui + :type 'directory) + (defcustom org-roam-ui-custom-theme nil "Custom theme for `org-roam-ui'. Blocks 'org-roam-ui-sync-theme from syncing your current theme, @@ -131,6 +129,21 @@ Defaults to #'browse-url." :group 'org-roam-ui :type 'function) +(defcustom org-roam-ui-tags-function #'org-roam-ui-get-tags + "Function that returns all tags as a list." + :group 'org-roam-ui + :type 'function) + +(defcustom org-roam-ui-nodes-function #'org-roam-ui-get-nodes + "Function that returns nodes." + :group 'org-roam-ui + :type 'function) + +(defcustom org-roam-ui-links-function #'org-roam-ui-get-links + "Function that returns links." + :group 'org-roam-ui + :type 'function) + ;;Hooks (defcustom org-roam-ui-before-open-node-functions nil |