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 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,24 +1144,26 @@ 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))
|
||||||
(propertize
|
(name (safe-persp-name persp)))
|
||||||
(format " #%s " (safe-persp-name persp))
|
(unless (string-equal persp-nil-name name)
|
||||||
'face (if (and persp
|
(propertize
|
||||||
(not (persp-contain-buffer-p (current-buffer) persp)))
|
(format " #%s " name)
|
||||||
'doom-modeline-persp-buffer-not-in-persp
|
'face (if (and persp
|
||||||
'doom-modeline-persp-name)
|
(not (persp-contain-buffer-p (current-buffer) persp)))
|
||||||
'help-echo "mouse-1: Switch perspective
|
'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-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)
|
||||||
(define-key map [mode-line mouse-2]
|
(define-key map [mode-line mouse-2]
|
||||||
(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