seagle0128 / doom-modeline

A fancy and fast mode-line inspired by minimalism design.
https://seagle0128.github.io/doom-modeline/
GNU General Public License v3.0
1.27k stars 157 forks source link

[Feature Request] Custom Meow--indicator cannot be used. #727

Closed subego closed 1 month ago

subego commented 1 month ago

Is your feature request related to a problem? Please describe. meow does not have its own face definition. Unable to use the custom meow--indicator."

Describe the solution you'd like

;; Define a new face for Meow.
(defface doom-modeline-meow-normal-state
    '((t (:inherit doom-modeline-evil-normal-state)))
  "Face for the normal state in meow-edit indicator."
  :group 'doom-modeline-faces)

(defface doom-modeline-meow-insert-state
    '((t (:inherit doom-modeline-evil-insert-state)))
  "Face for the insert state in meow-edit indicator."
  :group 'doom-modeline-faces)

(defface doom-modeline-meow-beacon-state
    '((t (:inherit doom-modeline-evil-visual-state)))
  "Face for the beacon state in meow-edit indicator."
  :group 'doom-modeline-faces)

(defface doom-modeline-meow-motion-state
    '((t (:inherit doom-modeline-evil-motion-state)))
  "Face for the motion state in meow-edit indicator."
  :group 'doom-modeline-faces)

(defface doom-modeline-meow-keypad-state
    '((t (:inherit doom-modeline-evil-operator-state)))
  "Face for the keypad state in meow-edit indicator."
  :group 'doom-modeline-faces)

(defsubst doom-modeline--meow ()
  "The current Meow state. Requires `meow-mode' to be enabled."
  (when (bound-and-true-p meow-mode)
    (doom-modeline--modal-icon
     ;; (symbol-name (meow--current-state))
     (substring-no-properties meow--indicator)    ;;Use Meow's custom indicator configuration.
     (cond
       ((meow-normal-mode-p) 'doom-modeline-meow-normal-state)
       ((meow-insert-mode-p) 'doom-modeline-meow-insert-state)
       ((meow-beacon-mode-p) 'doom-modeline-meow-beacon-state)
       ((meow-motion-mode-p) 'doom-modeline-meow-motion-state)
       ((meow-keypad-mode-p) 'doom-modeline-meow-keypad-state)
       (t 'doom-modeline-meow-normal-state))
     (symbol-name (meow--current-state))
     (cond
       ((meow-normal-mode-p) "nf-md-alpha_n_circle")
       ((meow-insert-mode-p) "nf-md-alpha_i_circle")
       ((meow-beacon-mode-p) "nf-md-alpha_b_circle")
       ((meow-motion-mode-p) "nf-md-alpha_m_circle")
       ((meow-keypad-mode-p) "nf-md-alpha_k_circle")
       (t "nf-md-alpha_n_circle"))
     (cond
       ((meow-normal-mode-p) "πŸ…")
       ((meow-insert-mode-p) "πŸ…˜")
       ((meow-beacon-mode-p) "πŸ…‘")
       ((meow-motion-mode-p) "πŸ…œ")
       ((meow-keypad-mode-p) "πŸ…š")
       (t "πŸ…")))))