commit 7a34fbdbe497723901881b823bf32051ad26f4ea parent d8724d86572c9e8c0f1d0abcfb8429aa153226dd Author: Vincent Demeester <vincent@sbr.pm> Date: Tue, 18 Aug 2020 18:39:47 +0200 tools/emacs: add cursor configuration… … default is non-blinking, box in active window, bar in inactive window. Adding a "blinking" cursor mode. Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | tools/emacs/config/config-appearance.el | | | 28 | ++++++++++++++++++++++++++-- |
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/tools/emacs/config/config-appearance.el b/tools/emacs/config/config-appearance.el @@ -48,8 +48,32 @@ (global-unset-key (kbd "C-x C-z")) (global-unset-key (kbd "C-h h"))) -;; LoadTheme -;; -LoadTheme +(use-package frame + :commands vde/cursor-type-mode + :config + (setq-default cursor-type 'box) + (setq-default cursor-in-non-selected-windows '(bar . 2)) + (setq-default blink-cursor-blinks 50) + (setq-default blink-cursor-interval nil) ; 0.75 would be my choice + (setq-default blink-cursor-delay 0.2) + + (blink-cursor-mode -1) + + (define-minor-mode vde/cursor-type-mode + "Toggle between static block and pulsing bar cursor." + :init-value nil + :global t + (if vde/cursor-type-mode + (progn + (setq-local blink-cursor-interval 0.75 + cursor-type '(bar . 2) + cursor-in-non-selected-windows 'hollow) + (blink-cursor-mode 1)) + (dolist (local '(blink-cursor-interval + cursor-type + cursor-in-non-selected-windows)) + (kill-local-variable `,local)) + (blink-cursor-mode -1)))) ;; UseTheme (use-package emacs