summary refs log tree commit diff stats
path: root/lisp/+modeline.el
diff options
context:
space:
mode:
authorCase Duckworth2022-01-06 22:54:56 -0600
committerCase Duckworth2022-01-06 22:54:56 -0600
commit9b9d026b613fd90230f0bdde9f87b2142d9bfc53 (patch)
tree7b0d48cca8a63b1ce73c81c90b89807aacc554ce /lisp/+modeline.el
parentMerge branch 'main' of https://tildegit.org/acdw/emacs (diff)
downloademacs-9b9d026b613fd90230f0bdde9f87b2142d9bfc53.tar.gz
emacs-9b9d026b613fd90230f0bdde9f87b2142d9bfc53.zip
Add god-mode
I'm trying this out ... again
Diffstat (limited to 'lisp/+modeline.el')
-rw-r--r--lisp/+modeline.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index 4063d83..a0195f1 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -240,5 +240,23 @@ The order of elements matters: whichever one matches first is applied."
240 (concat (or spacer +modeline-default-spacer) 240 (concat (or spacer +modeline-default-spacer)
241 (window-parameter (selected-window) 'ace-window-path)))) 241 (window-parameter (selected-window) 'ace-window-path))))
242 242
243(defun +modeline-god-mode (&optional spacer)
244 "Display an icon when `god-mode' is active."
245 (when (and (boundp 'god-local-mode) god-local-mode)
246 (concat (or spacer +modeline-default-spacer)
247 (propertize "Ω"
248 'help-echo (concat "God mode is active."
249 "\nmouse-1: exit God mode.")
250 'local-map (purecopy
251 (simple-modeline-make-mouse-map
252 'mouse-1 (lambda (e)
253 (interactive "e")
254 (with-selected-window
255 (posn-window
256 (event-start ev))
257 (god-local-mode -1)
258 (force-mode-line-update)))))
259 'mouse-face 'mode-line-highlight))))
260
243(provide '+modeline) 261(provide '+modeline)
244;;; +modeline.el ends here 262;;; +modeline.el ends here