mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-30 11:09:55 +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 mc/mode-line)
|
||||||
(defvar minions-mode)
|
(defvar minions-mode)
|
||||||
(defvar minions-mode-line-lighter)
|
(defvar minions-mode-line-lighter)
|
||||||
|
(defvar persp-nil-name)
|
||||||
(defvar symbol-overlay-keywords-alist)
|
(defvar symbol-overlay-keywords-alist)
|
||||||
(defvar symbol-overlay-temp-symbol)
|
(defvar symbol-overlay-temp-symbol)
|
||||||
(defvar text-scale-mode-amount)
|
(defvar text-scale-mode-amount)
|
||||||
|
@ -1143,16 +1144,18 @@ Requires `eyebrowse-mode' to be enabled."
|
||||||
(bound-and-true-p persp-mode)
|
(bound-and-true-p persp-mode)
|
||||||
(fboundp 'safe-persp-name)
|
(fboundp 'safe-persp-name)
|
||||||
(fboundp 'get-current-persp))
|
(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
|
(propertize
|
||||||
(format " #%s " (safe-persp-name persp))
|
(format " #%s " name)
|
||||||
'face (if (and persp
|
'face (if (and persp
|
||||||
(not (persp-contain-buffer-p (current-buffer) persp)))
|
(not (persp-contain-buffer-p (current-buffer) persp)))
|
||||||
'doom-modeline-persp-buffer-not-in-persp
|
'doom-modeline-persp-buffer-not-in-persp
|
||||||
'doom-modeline-persp-name)
|
'doom-modeline-persp-name)
|
||||||
'help-echo "mouse-1: Switch perspective
|
'help-echo "mouse-1: Switch perspective
|
||||||
mouse-2: Show help for minor mode"
|
mouse-2: Show help for minor mode"
|
||||||
'mouse-face '(:box 1)
|
'mouse-face 'mode-line-highlight
|
||||||
'local-map (let ((map (make-sparse-keymap)))
|
'local-map (let ((map (make-sparse-keymap)))
|
||||||
(define-key map [mode-line mouse-1]
|
(define-key map [mode-line mouse-1]
|
||||||
#'persp-switch)
|
#'persp-switch)
|
||||||
|
@ -1160,7 +1163,7 @@ mouse-2: Show help for minor mode"
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(describe-function 'persp-mode)))
|
(describe-function 'persp-mode)))
|
||||||
map))))))
|
map)))))))
|
||||||
|
|
||||||
(add-hook 'find-file-hook #'doom-modeline-update-persp-name)
|
(add-hook 'find-file-hook #'doom-modeline-update-persp-name)
|
||||||
(add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
|
(add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
|
||||||
|
|
Loading…
Reference in a new issue