Merge branch 'client-indicator' into 'master'
Added emacsclient segment See merge request jessieh/mood-line!10
This commit is contained in:
commit
02a22a0102
32
mood-line.el
32
mood-line.el
@ -110,6 +110,8 @@
|
||||
(:buffer-modified . ?*)
|
||||
(:buffer-read-only . ?#)
|
||||
|
||||
(:emacsclient . ?c)
|
||||
|
||||
(:count-separator . ?*))
|
||||
"Set of ASCII glyphs for use with mood-line.")
|
||||
|
||||
@ -131,6 +133,8 @@
|
||||
(:buffer-modified . ?●)
|
||||
(:buffer-read-only . ?■)
|
||||
|
||||
(:emacsclient . ?▶)
|
||||
|
||||
(:count-separator . ?×))
|
||||
"Set of Fira Code-compatible glyphs for use with mood-line.")
|
||||
|
||||
@ -152,6 +156,8 @@
|
||||
(:buffer-modified . ?●)
|
||||
(:buffer-read-only . ?■)
|
||||
|
||||
(:emacsclient . ?↹)
|
||||
|
||||
(:count-separator . ?✕))
|
||||
"Set of Unicode glyphs for use with mood-line.")
|
||||
|
||||
@ -237,6 +243,8 @@ glyph. Glyphs used by mood-line include:
|
||||
`:buffer-modified' | File-backed buffer is modified
|
||||
`:buffer-read-only' | File-backed buffer is read-only
|
||||
|
||||
`:emacsclient' | Frame is a client for an Emacs daemon
|
||||
|
||||
`:count-separator' | Separates some indicator names from numerical counts
|
||||
|
||||
`mood-line-glyphs-ascii' will be used as a fallback wherever the a glyph may be
|
||||
@ -247,13 +255,13 @@ found to be missing in `mood-line-glyph-alist'."
|
||||
:value-type (character :tag "Character to use")))
|
||||
|
||||
(defcustom mood-line-evil-state-alist
|
||||
'((normal . ("<N>" . font-lock-variable-name-face))
|
||||
(insert . ("<I>" . font-lock-string-face))
|
||||
(visual . ("<V>" . font-lock-keyword-face))
|
||||
(replace . ("<R>" . font-lock-type-face))
|
||||
(motion . ("<M>" . font-lock-constant-face))
|
||||
'((normal . ("<N>" . font-lock-variable-name-face))
|
||||
(insert . ("<I>" . font-lock-string-face))
|
||||
(visual . ("<V>" . font-lock-keyword-face))
|
||||
(replace . ("<R>" . font-lock-type-face))
|
||||
(motion . ("<M>" . font-lock-constant-face))
|
||||
(operator . ("<O>" . font-lock-function-name-face))
|
||||
(emacs . ("<E>" . font-lock-builtin-face)))
|
||||
(emacs . ("<E>" . font-lock-builtin-face)))
|
||||
"Set the string and corresponding face for any `evil-mode' state.
|
||||
The `Face' may be either a face symbol or a property list of key-value pairs
|
||||
e.g. (:foreground \"red\")."
|
||||
@ -451,6 +459,17 @@ Modal modes checked, in order: `evil-mode', `meow-mode', `god-mode'."
|
||||
((featurep 'god-mode)
|
||||
(mood-line-segment-modal-god))))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; Emacsclient segment function
|
||||
;; ---------------------------------- ;;
|
||||
|
||||
(defun mood-line-segment-emacsclient ()
|
||||
"Indicate whether or not the frame is an emacsclient."
|
||||
(if (not (eq (format-mode-line mode-line-client) ""))
|
||||
(format #("%s " 0 1 (face mood-line-status-info))
|
||||
(mood-line--get-glyph :emacsclient))
|
||||
""))
|
||||
|
||||
;; -------------------------------------------------------------------------- ;;
|
||||
;;
|
||||
;; Anzu segment
|
||||
@ -901,6 +920,7 @@ Checkers checked, in order: `flycheck', `flymake'."
|
||||
(:eval (mood-line-segment-modal))
|
||||
(:eval (mood-line-segment-buffer-status))
|
||||
(:eval (mood-line-segment-buffer-name))
|
||||
(:eval (mood-line-segment-emacsclient))
|
||||
(:eval (mood-line-segment-anzu))
|
||||
(:eval (mood-line-segment-multiple-cursors))
|
||||
(:eval (mood-line-segment-cursor-position))))
|
||||
|
Loading…
Reference in New Issue
Block a user