Merge branch 'master'

This commit is contained in:
Jessie Hildebrandt 2023-12-09 06:10:01 -05:00
commit 10b5195f1b
2 changed files with 17 additions and 2 deletions

View File

@ -107,6 +107,16 @@ e.g., (:foreground \"red\")."
(concat (propertize (car mode-cons) (concat (propertize (car mode-cons)
'face (cdr mode-cons)))))) 'face (cdr mode-cons))))))
;; ---------------------------------- ;;
;; Xah segment
;; ---------------------------------- ;;
(defun mood-line-segment-modal--xah-fn ()
"Display the current xah-fly-keys state."
(if (bound-and-true-p xah-fly-insert-state-p)
"<I>"
"<C>"))
;; ---------------------------------- ;; ;; ---------------------------------- ;;
;; God segment ;; God segment
;; ---------------------------------- ;; ;; ---------------------------------- ;;

View File

@ -460,17 +460,22 @@ described in the documentation for `mood-line-format', which see."
(mood-line--deflazy mood-line-segment-modal--evil-fn) (mood-line--deflazy mood-line-segment-modal--evil-fn)
(mood-line--deflazy mood-line-segment-modal--meow-fn) (mood-line--deflazy mood-line-segment-modal--meow-fn)
(mood-line--deflazy mood-line-segment-modal--xah-fn)
(mood-line--deflazy mood-line-segment-modal--god-fn) (mood-line--deflazy mood-line-segment-modal--god-fn)
(defun mood-line-segment-modal () (defun mood-line-segment-modal ()
"Return the correct mode line segment for the first active modal mode found. "Return the correct mode line segment for the first active modal mode found.
Modal modes checked, in order: `evil-mode', `meow-mode', `god-mode'." Modal editing modes checked, in order:
`evil-mode', `meow-mode', `xah-fly-keys', `god-mode'"
(cond (cond
((bound-and-true-p evil-mode) ((bound-and-true-p evil-mode)
(mood-line-segment-modal--evil-fn)) (mood-line-segment-modal--evil-fn))
((bound-and-true-p meow-mode) ((bound-and-true-p meow-mode)
(mood-line-segment-modal--meow-fn)) (mood-line-segment-modal--meow-fn))
((featurep 'god-mode) ((bound-and-true-p xah-fly-keys)
(mood-line-segment-modal--xah-fn))
((or (bound-and-true-p 'god-local-mode)
(bound-and-true-p 'god-global-mode))
(mood-line-segment-modal--god-fn)))) (mood-line-segment-modal--god-fn))))
;; ---------------------------------- ;; ;; ---------------------------------- ;;