summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-12-18 07:42:58 +0200
committerThanos Apollo <[email protected]>2024-12-18 07:42:58 +0200
commit1b839dd927ab7b95525543720da3c794e326b5c7 (patch)
tree754c6307a2a28b5913f3b2236d1600c745056cb1 /org-roam-ui.el
parentd21ffc3d600353fa4ac17d825beb219be8c7bb6c (diff)
Disable theme sync & adjust node update hook.
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 97e1da2..775b3ea 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -57,7 +57,7 @@
:group 'org-roam-ui
:type 'number)
-(defcustom org-roam-ui-sync-theme t
+(defcustom org-roam-ui-sync-theme nil
"If true, sync your current Emacs theme with `org-roam-ui'.
Works best with doom-themes.
Ignored if a custom theme is provied for variable 'org-roam-ui-custom-theme'."
@@ -612,7 +612,7 @@ from all other links."
(defun org-roam-ui--update-current-node ()
"Send the current node data to the web-socket."
(when (and (websocket-openp org-roam-ui-ws-socket)
- (org-roam-buffer-p)
+ (bound-and-true-p org-gnosis-mode)
(buffer-file-name (buffer-base-buffer)))
(let* ((node (org-gnosis-get-id)))
(setq org-roam-ui--ws-current-node node)
@@ -814,9 +814,9 @@ Optionally with ID (string), SPEED (number, ms) and PADDING (number, px)."
:init-value nil
(if org-roam-ui-follow-mode
(progn
- (add-hook 'org-gnosis-mode-hook #'org-roam-ui-node-zoom)
+ (add-hook 'post-command-hook #'org-roam-ui--update-current-node)
(message "org-roam-ui will now follow you around."))
- (remove-hook 'org-gnosis-mode-hook #'org-roam-ui-node-zoom)
+ (remove-hook 'post-command-hook #'org-roam-ui--update-current-node)
(message "org-roam-ui will now leave you alone.")))
(provide 'org-roam-ui)