New paste Repaste Download
;; NOTE 2024-02-16: when `tab-bar-mode' is enabled & `tab-bar-format-global'
;; is part of `tab-bar-format', the `my/mode-line-misc-info' construct
;; omits the `global-mode-string'.
(defvar-local my/modeline-misc-info
    '(:eval
      (and (mode-line-window-selected-p)
           (append
            (butlast mode-line-misc-info)
            '(" ")
            (unless (and tab-bar-mode
                         (length> (frame-parameter (window-frame) 'tabs)
                                  tab-bar-show)
                         (memq 'tab-bar-format-global tab-bar-format))
              '((global-mode-string ("" global-mode-string " ")))))))
  "Display `mode-line-misc-info' only in selected window.")
(put 'my/modeline-misc-info 'risky-local-variable t)
Filename: None. Size: 781b. View raw, , hex, or download this file.

This paste expires on 2025-07-25 18:29:14.708570. Pasted through web.