mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Don't display persp-nil-name.
This commit is contained in:
parent
f57444a9b4
commit
78a0287515
1 changed files with 20 additions and 17 deletions
|
@ -63,6 +63,7 @@
|
|||
(defvar mc/mode-line)
|
||||
(defvar minions-mode)
|
||||
(defvar minions-mode-line-lighter)
|
||||
(defvar persp-nil-name)
|
||||
(defvar symbol-overlay-keywords-alist)
|
||||
(defvar symbol-overlay-temp-symbol)
|
||||
(defvar text-scale-mode-amount)
|
||||
|
@ -1143,16 +1144,18 @@ Requires `eyebrowse-mode' to be enabled."
|
|||
(bound-and-true-p persp-mode)
|
||||
(fboundp 'safe-persp-name)
|
||||
(fboundp 'get-current-persp))
|
||||
(let ((persp (get-current-persp)))
|
||||
(let* ((persp (get-current-persp))
|
||||
(name (safe-persp-name persp)))
|
||||
(unless (string-equal persp-nil-name name)
|
||||
(propertize
|
||||
(format " #%s " (safe-persp-name persp))
|
||||
(format " #%s " name)
|
||||
'face (if (and persp
|
||||
(not (persp-contain-buffer-p (current-buffer) persp)))
|
||||
'doom-modeline-persp-buffer-not-in-persp
|
||||
'doom-modeline-persp-name)
|
||||
'help-echo "mouse-1: Switch perspective
|
||||
mouse-2: Show help for minor mode"
|
||||
'mouse-face '(:box 1)
|
||||
'mouse-face 'mode-line-highlight
|
||||
'local-map (let ((map (make-sparse-keymap)))
|
||||
(define-key map [mode-line mouse-1]
|
||||
#'persp-switch)
|
||||
|
@ -1160,7 +1163,7 @@ mouse-2: Show help for minor mode"
|
|||
(lambda ()
|
||||
(interactive)
|
||||
(describe-function 'persp-mode)))
|
||||
map))))))
|
||||
map)))))))
|
||||
|
||||
(add-hook 'find-file-hook #'doom-modeline-update-persp-name)
|
||||
(add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
|
||||
|
|
Loading…
Reference in a new issue