Compare commits
No commits in common. "main" and "3.1.0" have entirely different histories.
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
;;
|
;;
|
||||||
;; Author: Jessie Hildebrandt <jessieh.net>
|
;; Author: Jessie Hildebrandt <jessieh.net>
|
||||||
;; Homepage: https://gitlab.com/jessieh/mood-line
|
;; Homepage: https://gitlab.com/jessieh/mood-line
|
||||||
;;
|
|
||||||
;; This file is not part of GNU Emacs.
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
;; Author: Alynx Zhou <alynx.zhou@gmail.com>
|
;; Author: Alynx Zhou <alynx.zhou@gmail.com>
|
||||||
;; Jessie Hildebrandt <jessieh.net>
|
;; Jessie Hildebrandt <jessieh.net>
|
||||||
;; Homepage: https://gitlab.com/jessieh/mood-line
|
;; Homepage: https://gitlab.com/jessieh/mood-line
|
||||||
;;
|
|
||||||
;; This file is not part of GNU Emacs.
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
;; Author: trevDev() <trev@trevdev.ca>
|
;; Author: trevDev() <trev@trevdev.ca>
|
||||||
;; Jessie Hildebrandt <jessieh.net>
|
;; Jessie Hildebrandt <jessieh.net>
|
||||||
;; Homepage: https://gitlab.com/jessieh/mood-line
|
;; Homepage: https://gitlab.com/jessieh/mood-line
|
||||||
;;
|
|
||||||
;; This file is not part of GNU Emacs.
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
@ -107,16 +107,6 @@ 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
|
||||||
;; ---------------------------------- ;;
|
;; ---------------------------------- ;;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
;;
|
;;
|
||||||
;; Author: Jessie Hildebrandt <jessieh.net>
|
;; Author: Jessie Hildebrandt <jessieh.net>
|
||||||
;; Homepage: https://gitlab.com/jessieh/mood-line
|
;; Homepage: https://gitlab.com/jessieh/mood-line
|
||||||
;;
|
|
||||||
;; This file is not part of GNU Emacs.
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
27
mood-line.el
27
mood-line.el
@ -220,7 +220,6 @@ An optional key :padding may be provided, the value of which will be used as
|
|||||||
((or (mood-line-segment-buffer-status)
|
((or (mood-line-segment-buffer-status)
|
||||||
(mood-line-segment-client)
|
(mood-line-segment-client)
|
||||||
" ") . " ")
|
" ") . " ")
|
||||||
((mood-line-segment-project) . "/")
|
|
||||||
((mood-line-segment-buffer-name) . " ")
|
((mood-line-segment-buffer-name) . " ")
|
||||||
((mood-line-segment-anzu) . " ")
|
((mood-line-segment-anzu) . " ")
|
||||||
((mood-line-segment-multiple-cursors) . " ")
|
((mood-line-segment-multiple-cursors) . " ")
|
||||||
@ -356,7 +355,7 @@ See `mood-line-defformat' for a helpful formatting macro."
|
|||||||
:group 'mood-line-faces)
|
:group 'mood-line-faces)
|
||||||
|
|
||||||
(defface mood-line-frame-status-client
|
(defface mood-line-frame-status-client
|
||||||
'((t (:inherit mood-line-unimportant)))
|
'((t (:inherit shadow :weight normal)))
|
||||||
"Face used for the :frame-client frame status indicator.")
|
"Face used for the :frame-client frame status indicator.")
|
||||||
|
|
||||||
(defface mood-line-major-mode
|
(defface mood-line-major-mode
|
||||||
@ -461,22 +460,17 @@ 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 editing modes checked, in order:
|
Modal modes checked, in order: `evil-mode', `meow-mode', `god-mode'."
|
||||||
`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))
|
||||||
((bound-and-true-p xah-fly-keys)
|
((featurep 'god-mode)
|
||||||
(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))))
|
||||||
|
|
||||||
;; ---------------------------------- ;;
|
;; ---------------------------------- ;;
|
||||||
@ -527,21 +521,6 @@ Modal editing modes checked, in order:
|
|||||||
(propertize (mood-line--get-glyph :frame-client)
|
(propertize (mood-line--get-glyph :frame-client)
|
||||||
'face 'mood-line-frame-status-client)))
|
'face 'mood-line-frame-status-client)))
|
||||||
|
|
||||||
;; -------------------------------------------------------------------------- ;;
|
|
||||||
;;
|
|
||||||
;; Project segment
|
|
||||||
;;
|
|
||||||
;; -------------------------------------------------------------------------- ;;
|
|
||||||
|
|
||||||
(defun mood-line-segment-project ()
|
|
||||||
"Return project name from project.el or Projectile, if any."
|
|
||||||
(or
|
|
||||||
(and (fboundp 'project-name)
|
|
||||||
(project-current)
|
|
||||||
(project-name (project-current)))
|
|
||||||
(and (fboundp 'projectile-project-name)
|
|
||||||
(projectile-project-name))))
|
|
||||||
|
|
||||||
;; -------------------------------------------------------------------------- ;;
|
;; -------------------------------------------------------------------------- ;;
|
||||||
;;
|
;;
|
||||||
;; anzu segment
|
;; anzu segment
|
||||||
|
@ -34,12 +34,4 @@
|
|||||||
(should (string= (mood-line-segment-vc--rev "" 'SVN)
|
(should (string= (mood-line-segment-vc--rev "" 'SVN)
|
||||||
"???"))))
|
"???"))))
|
||||||
|
|
||||||
(ert-deftest --rev/vc-display-status-nil ()
|
|
||||||
"Name of the VCS backend should be reported when `vc-display-status' is nil."
|
|
||||||
(let ((vc-display-status nil))
|
|
||||||
(should (string= (mood-line-segment-vc--rev " Git:main" 'Git)
|
|
||||||
"Git"))
|
|
||||||
(should (string= (mood-line-segment-vc--rev " Hg:main" 'Hg)
|
|
||||||
"Hg"))))
|
|
||||||
|
|
||||||
;;; mood-line-segment-vc-test.el ends here
|
;;; mood-line-segment-vc-test.el ends here
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
(should (string= segments-str "ABC123XYZ"))))
|
(should (string= segments-str "ABC123XYZ"))))
|
||||||
|
|
||||||
;; ---------------------------------- ;;
|
;; ---------------------------------- ;;
|
||||||
;; mood-line--process-format
|
;; mood-line---process-format
|
||||||
;; ---------------------------------- ;;
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
(ert-deftest --process-format/default ()
|
(ert-deftest --process-format/default ()
|
||||||
|
Loading…
Reference in New Issue
Block a user