Update eyebrowse modeline segment
This commit is contained in:
parent
d662cd1b23
commit
f96aeffbef
@ -443,8 +443,6 @@
|
|||||||
|
|
||||||
(use-package eyebrowse
|
(use-package eyebrowse
|
||||||
:after perspective
|
:after perspective
|
||||||
:init
|
|
||||||
(setq eyebrowse-keymap-prefix (kbd "C-x C-x"))
|
|
||||||
:config
|
:config
|
||||||
(require 'eyepersp)
|
(require 'eyepersp)
|
||||||
(setq eyebrowse-default-workspace-slot 0)
|
(setq eyebrowse-default-workspace-slot 0)
|
||||||
|
@ -75,13 +75,18 @@
|
|||||||
(defun emodule/modeline-eyebrowse ()
|
(defun emodule/modeline-eyebrowse ()
|
||||||
"Return the currently active eyebrowse workspace."
|
"Return the currently active eyebrowse workspace."
|
||||||
(if (bound-and-true-p eyebrowse-mode)
|
(if (bound-and-true-p eyebrowse-mode)
|
||||||
(let* ((num (eyebrowse--get 'current-slot))
|
(let* ((cur (eyebrowse--get 'current-slot))
|
||||||
(tag (when num
|
(all (mapcar 'car (eyebrowse--get 'window-configs)))
|
||||||
(nth 2 (assoc num (eyebrowse--get 'window-configs)))))
|
strs)
|
||||||
(str (if (and tag (< 0 (length tag)))
|
(setq strs
|
||||||
tag
|
(mapcar (lambda (el)
|
||||||
(when num (int-to-string num)))))
|
(if (= cur el)
|
||||||
(propertize str 'face 'eyebrowse-mode-line-active))
|
(propertize (int-to-string el)
|
||||||
|
'face
|
||||||
|
'eyebrowse-mode-line-active)
|
||||||
|
(int-to-string el)))
|
||||||
|
all))
|
||||||
|
(apply 'concat strs))
|
||||||
""))
|
""))
|
||||||
|
|
||||||
(doom-modeline-def-segment emodule/modeline-eyebrowse-segment
|
(doom-modeline-def-segment emodule/modeline-eyebrowse-segment
|
||||||
|
Reference in New Issue
Block a user