summaryrefslogtreecommitdiff
path: root/emacs/inits/NO-06-god.el
diff options
context:
space:
mode:
authortslil clingman <>2023-12-02 11:47:46 +0100
committertslil clingman <>2023-12-02 11:47:46 +0100
commitb375c2447db003c771dc27e8b4a3865b0553f635 (patch)
tree9b686f5bd062a1dc45cd7b953ff46531a21306d8 /emacs/inits/NO-06-god.el
parent938a28f73bce3b71b0ce0b12446b4de5f9c9f11b (diff)
[emacs] disable tinymenu and god mode
Diffstat (limited to 'emacs/inits/NO-06-god.el')
-rw-r--r--emacs/inits/NO-06-god.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/emacs/inits/NO-06-god.el b/emacs/inits/NO-06-god.el
new file mode 100644
index 0000000..a17a5a4
--- /dev/null
+++ b/emacs/inits/NO-06-god.el
@@ -0,0 +1,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))