Skip to content

Commit

Permalink
Add perspectives support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Nov 2, 2015
1 parent 8bade0a commit 62b780f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions spaceline-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ ADDITIONAL-SEGMENTS are inserted on the right, between `global' and
`buffer-position'."
(spaceline-install

'(((workspace-number window-number)
'((((persp-name :fallback workspace-number)
window-number)
:fallback evil-state
:separator "|"
:face highlight-face)
Expand Down Expand Up @@ -68,7 +69,8 @@ ADDITIONAL-SEGMENTS are inserted on the right, between `global' and
`buffer-position'."
(spaceline-install

'(((((workspace-number window-number) :separator "|")
'((((((persp-name :fallback workspace-number)
window-number) :separator "|")
buffer-modified
buffer-size)
:face highlight-face)
Expand Down
12 changes: 11 additions & 1 deletion spaceline-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ Supports both Emacs and Evil cursor conventions."
(defvar spaceline--helm-buffer-ids
'(("*helm*" . "HELM")
("*helm M-x*" . "HELM M-x")
("*swiper*" . "SWIPER"))
("*swiper*" . "SWIPER")
("*Projectile Perspectives*" . "HELM Projectile Perspectives"))
"Alist of custom helm buffer names to use.")
(spaceline-define-segment helm-buffer-id
"Helm session identifier."
Expand Down Expand Up @@ -350,6 +351,15 @@ enabled."
str))
:when (bound-and-true-p eyebrowse-mode))

(spaceline-define-segment persp-name
"The current perspective name."
(let ((name (persp-curr-name)))
(if (file-directory-p name)
(file-name-nondirectory (directory-file-name name))
name))
:when (and (bound-and-true-p persp-mode)
(persp-curr-name)))

(defface spaceline-flycheck-error
'((t (:foreground "#FC5C94" :distant-foreground "#A20C41")))
"Face for flycheck error feedback in the modeline."
Expand Down

0 comments on commit 62b780f

Please sign in to comment.