Simplify modeline code
This commit is contained in:
10
eyebrowse.el
10
eyebrowse.el
@ -457,18 +457,16 @@ is detected, it will bind gt, gT, gc and zx, too."
|
|||||||
(active-item (propertize (number-to-string current-slot)
|
(active-item (propertize (number-to-string current-slot)
|
||||||
'face 'eyebrowse-mode-line-active))
|
'face 'eyebrowse-mode-line-active))
|
||||||
(window-configs (eyebrowse--get 'window-configs))
|
(window-configs (eyebrowse--get 'window-configs))
|
||||||
(window-config-slots (mapcar (lambda (item)
|
(window-config-slots (mapcar 'car window-configs)))
|
||||||
(number-to-string (car item)))
|
|
||||||
window-configs)))
|
|
||||||
(if (and (not (eq eyebrowse-mode-line-style 'hide))
|
(if (and (not (eq eyebrowse-mode-line-style 'hide))
|
||||||
(or (eq eyebrowse-mode-line-style 'always)
|
(or (eq eyebrowse-mode-line-style 'always)
|
||||||
(and (eq eyebrowse-mode-line-style 'smart)
|
(and (eq eyebrowse-mode-line-style 'smart)
|
||||||
(> (length window-configs) 1))))
|
(> (length window-configs) 1))))
|
||||||
(concat
|
(concat
|
||||||
left-delimiter
|
left-delimiter
|
||||||
(mapconcat 'identity
|
(mapconcat
|
||||||
(-replace (number-to-string current-slot)
|
(lambda (n) (if (= n current-slot) active-item (number-to-string n)))
|
||||||
active-item window-config-slots)
|
window-config-slots
|
||||||
separator)
|
separator)
|
||||||
right-delimiter)
|
right-delimiter)
|
||||||
"")))
|
"")))
|
||||||
|
|||||||
Reference in New Issue
Block a user