diff --git a/README.md b/README.md index 74674b9..d9832bc 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,9 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables. ;; If non nil the default perspective name is displayed in the mode-line. (setq doom-modeline-display-default-persp-name nil) +;; If non nil the perspective name is displayed alongside a folder icon. +(setq doom-modeline-persp-icon t) + ;; Whether display the `lsp' state. Non-nil to display in the mode-line. (setq doom-modeline-lsp t) diff --git a/doom-modeline-core.el b/doom-modeline-core.el index fc6aef9..eaa4fea 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -303,6 +303,11 @@ Non-nil to display in the mode-line." :type 'boolean :group 'doom-modeline) +(defcustom doom-modeline-persp-icon t + "If non nil the perspective name is displayed alongside a folder icon." + :type 'boolean + :group 'doom-modeline) + (defcustom doom-modeline-lsp t "Whether display the `lsp' state. diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 2be2b0f..864bab8 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1433,8 +1433,8 @@ Requires `eyebrowse-mode' or `tab-bar-mode' to be enabled." (when (or doom-modeline-display-default-persp-name (not (string-equal persp-nil-name name))) (concat (doom-modeline-spc) - (propertize (concat icon - (doom-modeline-vspc) + (propertize (concat (when doom-modeline-persp-icon + (concat icon (doom-modeline-vspc))) (propertize name 'face face)) 'help-echo "mouse-1: Switch perspective mouse-2: Show help for minor mode"