aboutsummaryrefslogtreecommitdiff
path: root/bard-elisp/bard-theme.el
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2024-12-09 21:36:14 -0500
committerBardofSprites <[email protected]>2024-12-09 21:36:14 -0500
commit0eccdd32a3944b312ae6031c979f2bfcf6546d54 (patch)
tree97eeeee3176239acc872494f7926e32ba40ab7cf /bard-elisp/bard-theme.el
parent877e23654c3abe6ac3f7d2fa6e353a30d9982f54 (diff)
ryo-modal with modeline and cursor
Diffstat (limited to 'bard-elisp/bard-theme.el')
-rw-r--r--bard-elisp/bard-theme.el22
1 files changed, 21 insertions, 1 deletions
diff --git a/bard-elisp/bard-theme.el b/bard-elisp/bard-theme.el
index 1d37ffb..fcc8a16 100644
--- a/bard-elisp/bard-theme.el
+++ b/bard-elisp/bard-theme.el
@@ -77,7 +77,8 @@
(dolist (hook '(bard/after-theme-load-hook))
(add-hook hook #'fontaine-apply-current-preset)
- (add-hook hook #'logos-update-fringe-in-buffers))
+ (add-hook hook #'logos-update-fringe-in-buffers)
+ (add-hook hook #'bard/update-ryo-cursor-color))
(defun bard/select-theme (&optional theme)
"Enable the specified THEME, or prompt the user to select one if THEME is nil."
@@ -96,4 +97,23 @@
(message "Loaded the %s theme" colored-theme-name)
(run-hooks 'bard/after-theme-load-hook)))
+(defun bard/update-ryo-cursor-color ()
+ "Update the color variable of `ryo-modal-mode' cursor to match the ef/modus theme."
+ (let ((active-theme (car custom-enabled-themes))
+ (cursor-color nil))
+ (cond
+ ((and (fboundp 'ef-themes-with-colors)
+ (string-prefix-p "ef-" (symbol-name active-theme)))
+ (ef-themes-with-colors
+ (setq ryo-modal-cursor-color cursor
+ ryo-modal-default-cursor-color cursor)))
+ ((and (fboundp 'modus-themes-with-colors)
+ (string-prefix-p "modus-" (symbol-name active-theme)))
+ (modus-themes-with-colors
+ (setq ryo-modal-cursor-color cursor
+ ryo-modal-default-cursor-color cursor)))
+ (t (setq cursor-color "red"))
+ (setq ryo-modal-cursor-color cursor-color
+ ryo-modal-default-cursor-color cursor-color))))
+
(provide 'bard-theme)