Merge pull request #333 from jmromer/make-layout-icon-toggleable

Make persp mode indicator icon toggleable
This commit is contained in:
Vincent Zhang 2020-04-24 07:15:02 -05:00 committed by GitHub
commit 96350f6f81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -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)

View file

@ -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.

View file

@ -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"