summary refs log tree commit diff stats
path: root/lisp/+modeline.el
diff options
context:
space:
mode:
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