Improve multiple-frame cursor and in-terminal handling for god-mode
This commit is contained in:
parent
57e3ef6e47
commit
7541c3e54f
18
init.el
18
init.el
|
@ -57,15 +57,18 @@
|
|||
:demand t
|
||||
:bind
|
||||
("<escape>" . god-mode-all)
|
||||
("ESC ESC ESC" . god-mode-all)
|
||||
("C-S-h" . help-command)
|
||||
("C-h" . my--god-del)
|
||||
(:map god-local-mode-map
|
||||
("i" . god-mode-all)
|
||||
("<escape>" . my--god-c-g)
|
||||
("ESC ESC ESC" . keyboard-escape-quit)
|
||||
("z" . repeat)
|
||||
("q" . my--god-c-q))
|
||||
(:map minibuffer-local-map
|
||||
("<escape>" . abort-minibuffers))
|
||||
("<escape>" . abort-minibuffers)
|
||||
("ESC ESC ESC" . keyboard-escape-quit))
|
||||
:custom
|
||||
(god-exempt-major-modes nil)
|
||||
(god-exempt-predicates (list #'god-exempt-mode-p))
|
||||
|
@ -88,17 +91,15 @@
|
|||
(with-eval-after-load 'catppuccin-theme
|
||||
(add-hook 'god-mode-enabled-hook
|
||||
(lambda ()
|
||||
(if (display-graphic-p)
|
||||
(set-cursor-color (catppuccin-get-color 'rosewater))
|
||||
(face-spec-set 'cursor `((t (:background ,(catppuccin-get-color 'rosewater)))))
|
||||
(unless (display-graphic-p)
|
||||
(send-string-to-terminal "\e[2 q"))))
|
||||
(add-hook 'god-mode-disabled-hook
|
||||
(lambda ()
|
||||
(if (display-graphic-p)
|
||||
(set-cursor-color (catppuccin-get-color 'mauve))
|
||||
(face-spec-set 'cursor `((t (:background ,(catppuccin-get-color 'mauve)))))
|
||||
(unless (display-graphic-p)
|
||||
;; Escape codes for hbar cursor in insert mode
|
||||
(send-string-to-terminal "\e[4 q")))))
|
||||
(unless (or (daemonp) (display-graphic-p))
|
||||
(keymap-global-set "C-l" (lambda () (interactive) (god-mode-all 0))))
|
||||
(god-mode))
|
||||
|
||||
(use-package multiple-cursors
|
||||
|
@ -148,8 +149,6 @@
|
|||
lisp-mode
|
||||
scheme-mode
|
||||
clojure-mode
|
||||
sly-mrepl-mode
|
||||
racket-repl-mode
|
||||
:config
|
||||
(add-to-list 'lispy-compat 'god-mode)
|
||||
(add-to-list 'lispy-compat 'magit-blame-mode)
|
||||
|
@ -660,6 +659,7 @@
|
|||
("C-c t" . eat)
|
||||
(:map eat-mode-map
|
||||
("<escape>" . eat-self-input))
|
||||
:hook (eat-mode . my-inhibit-hl-line-mode)
|
||||
:config
|
||||
(with-eval-after-load 'god-mode
|
||||
(add-to-list 'god-exempt-major-modes 'eat-mode)))
|
||||
|
|
Loading…
Reference in a new issue