blob: a17a5a43d4f137b6b7ca133c732d3c97b788a0e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
;; Time-stamp: <2021-09-27 08h47 EDT (hobbies)>
(use-package god-mode
:ensure t
:init
(defvar my-god-cursor-colour (frame-parameter (selected-frame) 'cursor-color))
:bind (("<escape>" . god-local-mode)
;; ("<tab>" . god-mode) ;; this is just too much trouble
;; useful
("C-x C-1" . delete-other-windows)
("C-x C-2" . split-window-below)
("C-x C-3" . split-window-right)
("C-x C-0" . delete-window))
:config
(push 'term-mode god-exempt-major-modes)
(defun my-god-update-cursor ()
(interactive)
(if (bound-and-true-p god-local-mode)
(set-cursor-color "red")
(set-cursor-color my-god-cursor-colour)))
(add-hook 'god-mode-enabled-hook #'my-god-update-cursor)
(add-hook 'god-mode-disabled-hook #'my-god-update-cursor))
|