summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-19 18:32:55 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-19 18:32:55 +0200
commit67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (patch)
tree2d7498fd846109c0e2f5e72d74d6fa71d6895c2e /org-roam-ui.el
parentbbb50922bf2d80e6b510eaca35477efb75704722 (diff)
added theme fetching
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 0911df4..2d4eb98 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -38,7 +38,6 @@
(insert response)
(httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*"))))
-
(defun nodes-row-to-cons (row)
(list
(cons 'id (elt row 0))
@@ -50,4 +49,16 @@
(cons 'source (elt row 1))
(cons 'target (elt row 2))))
+(defservlet* theme application/json ()
+ (when 'doom-themes--colors
+ (let*
+ ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25)))
+ ui-theme (list nil))
+ (progn
+ (dolist (color colors)
+ (push (cons (car color) (car (cdr color))) ui-theme))
+ (insert (json-encode ui-theme))
+ (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")))))
+
+
(provide 'org-roam-ui)