Compare commits

..

7 Commits

Author SHA1 Message Date
4ecd41b934 Improve icon contrast (again) 2023-12-09 06:29:07 -05:00
c0331b4879 Improve icon contrast 2023-12-09 06:28:04 -05:00
2a595780b3 Update repo icon 2023-12-09 06:25:44 -05:00
10b5195f1b Merge branch 'master' 2023-12-09 06:10:01 -05:00
99083c7c3a Bump minor version number 2023-12-09 05:52:27 -05:00
9b004b3d94 Tidy docs 2023-12-09 05:51:54 -05:00
Gregg Sangster
8331e01908 Add xah-fly-keys to modal segment 2023-03-16 15:54:27 -04:00
5 changed files with 22 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

View File

@ -69,8 +69,8 @@ mood-line uses a modular segment format, and it is easy to reconfigure:
((mood-line-segment-checker) . " "))))
```
More information on the format specification is available in the documentation: \
`M-x describe-variable mood-line-format` \
More information on the format specification is available in the documentation:\
`M-x describe-variable mood-line-format`\
`M-x describe-function mood-line-defformat`
### Glyphs

View File

@ -107,6 +107,16 @@ e.g., (:foreground \"red\")."
(concat (propertize (car 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
;; ---------------------------------- ;;

View File

@ -1,11 +1,11 @@
;;; mood-line.el --- A minimal mode line inspired by doom-modeline -*- lexical-binding: t; -*-
;;
;; Author: Jessie Hildebrandt <jessieh.net>
;; Homepage: https://gitlab.com/jessieh/mood-line
;; Keywords: mode-line faces
;; Version: 3.0.1
;; Version: 3.1.0
;; Package-Requires: ((emacs "26.1"))
;;
;; This file is not part of GNU Emacs.
;;; Commentary:
@ -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--meow-fn)
(mood-line--deflazy mood-line-segment-modal--xah-fn)
(mood-line--deflazy mood-line-segment-modal--god-fn)
(defun mood-line-segment-modal ()
"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
((bound-and-true-p evil-mode)
(mood-line-segment-modal--evil-fn))
((bound-and-true-p meow-mode)
(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))))
;; ---------------------------------- ;;