Update modeline display for perspective/eyebrowse
This commit is contained in:
parent
bf6c502072
commit
98bf6ba79e
@ -41,19 +41,32 @@
|
|||||||
(setq-default doom-modeline-height 23)
|
(setq-default doom-modeline-height 23)
|
||||||
|
|
||||||
;; Add perspective to modeline
|
;; Add perspective to modeline
|
||||||
(doom-modeline-def-segment perspectives
|
(doom-modeline-def-segment perspective-name
|
||||||
"Perspectives list and selection. Requires `persp-mode' to be enabled."
|
"Perspectives list and selection. Requires `persp-mode' to be enabled."
|
||||||
(if (and (bound-and-true-p persp-mode)
|
(if (bound-and-true-p persp-mode)
|
||||||
(< 1 (hash-table-count (perspectives-hash))))
|
(persp-format-name (persp-name (persp-curr)))
|
||||||
(persp-mode-line)
|
""))
|
||||||
|
(declare-function doom-modeline-segment--perspective-name "em-modeline")
|
||||||
|
|
||||||
|
(doom-modeline-def-segment workspace-number
|
||||||
|
"The current workspace name or number. Requires `eyebrowse-mode' to be
|
||||||
|
enabled."
|
||||||
|
(if (bound-and-true-p eyebrowse-mode)
|
||||||
|
(let* ((num (eyebrowse--get 'current-slot))
|
||||||
|
(tag (when num (nth 2 (assoc num (eyebrowse--get 'window-configs)))))
|
||||||
|
(str (if (and tag (< 0 (length tag)))
|
||||||
|
tag
|
||||||
|
(when num (int-to-string num)))))
|
||||||
|
(format ":%s" (propertize str 'face 'doom-modeline-eyebrowse)))
|
||||||
""))
|
""))
|
||||||
(declare-function doom-modeline-segment--perspectives "em-modeline")
|
|
||||||
|
|
||||||
;; Set the modeline
|
;; Set the modeline
|
||||||
(doom-modeline-def-modeline main
|
(doom-modeline-def-modeline main
|
||||||
|
|
||||||
(perspectives
|
("["
|
||||||
|
perspective-name
|
||||||
workspace-number
|
workspace-number
|
||||||
|
"]"
|
||||||
bar
|
bar
|
||||||
matches
|
matches
|
||||||
" "
|
" "
|
||||||
|
@ -436,6 +436,9 @@
|
|||||||
;; perspective
|
;; perspective
|
||||||
`(persp-selected-face ((t (:weight bold :foreground ,*head1*))))
|
`(persp-selected-face ((t (:weight bold :foreground ,*head1*))))
|
||||||
|
|
||||||
|
;; doom modeline
|
||||||
|
`(doom-modeline-eyebrowse ((t (:weight bold :foreground ,*string*))))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Define values for colours that don't use faces.
|
;; Define values for colours that don't use faces.
|
||||||
|
Reference in New Issue
Block a user