diff --git a/doom-modeline-core.el b/doom-modeline-core.el index 9b070b1..3a4a5bb 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -101,6 +101,9 @@ It returns a file name which can be used directly as argument of ("pause" . "\xe034") ("priority_high" . "\xe645") + ;; Persp + ("aspect_ratio" . "\xe85b") + ;; LSP ("rocket" . "\xf135") diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index fa32b6b..4395d0a 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1332,28 +1332,32 @@ Requires `eyebrowse-mode' to be enabled." (let* ((persp (get-current-persp)) (name (safe-persp-name persp)) (icon (if (and doom-modeline-icon doom-modeline-persp-name-icon) - (concat (doom-modeline-icon-material "aspect_ratio" :v-adjust -0.17) (doom-modeline-spc)) - "#"))) + (doom-modeline-icon-material "aspect_ratio" :v-adjust -0.225) + "#")) + (face (if (and persp + (not (persp-contain-buffer-p (current-buffer) persp))) + 'doom-modeline-persp-buffer-not-in-persp + 'doom-modeline-persp-name))) (unless (string-equal persp-nil-name name) (concat (doom-modeline-spc) - (propertize - (format "%s%s" icon name) - 'face (if (and persp - (not (persp-contain-buffer-p (current-buffer) persp))) - 'doom-modeline-persp-buffer-not-in-persp - 'doom-modeline-persp-name) - 'help-echo "mouse-1: Switch perspective + (propertize icon + 'face `(:inherit ,(get-text-property 0 'face icon) + :inherit ,face)) + (doom-modeline-vspc) + (propertize name + 'face face + 'help-echo "mouse-1: Switch perspective mouse-2: Show help for minor mode" - 'mouse-face 'mode-line-highlight - 'local-map (let ((map (make-sparse-keymap))) - (define-key map [mode-line mouse-1] - #'persp-switch) - (define-key map [mode-line mouse-2] - (lambda () - (interactive) - (describe-function 'persp-mode))) - map)) + 'mouse-face 'mode-line-highlight + 'local-map (let ((map (make-sparse-keymap))) + (define-key map [mode-line mouse-1] + #'persp-switch) + (define-key map [mode-line mouse-2] + (lambda () + (interactive) + (describe-function 'persp-mode))) + map)) (doom-modeline-spc))))))) (add-hook 'find-file-hook #'doom-modeline-update-persp-name) diff --git a/doom-modeline.el b/doom-modeline.el index 642b524..bae8ac6 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -4,7 +4,7 @@ ;; Author: Vincent Zhang ;; Homepage: https://github.com/seagle0128/doom-modeline -;; Version: 2.3.6 +;; Version: 2.3.7 ;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (dash "2.11.0")) ;; Keywords: faces mode-line