Created
May 11, 2016 15:27
-
-
Save bmag/417dbfffbc5b070b9cb0cfc8bf0b6768 to your computer and use it in GitHub Desktop.
new spaceline conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-eval-after-load 'spaceline | |
(setq powerline-default-separator 'bar) | |
(set-face-attribute 'mode-line-inactive nil :box nil) | |
(spaceline-toggle-minor-modes-off) | |
(with-eval-after-load 'window-purpose | |
(spaceline-define-segment purpose | |
"Purpose of buffer." | |
;; (purpose--modeline-string) | |
(when purpose-mode (format "%s%s%s" | |
(purpose-buffer-purpose (current-buffer)) | |
(if (window-dedicated-p) "#" "") | |
(if (purpose-window-purpose-dedicated-p) "!" "")))) | |
(let* ((main-mode-line (cdr (assq 'main spaceline--mode-lines))) | |
(left-mode-line (car main-mode-line)) | |
(right-mode-line (cdr main-mode-line))) | |
(unless (memq 'purpose left-mode-line) | |
(setcar main-mode-line | |
(-insert-at (1+ (-elem-index 'major-mode left-mode-line)) | |
'purpose | |
left-mode-line)))) | |
;; remove purpose-mode from minor-modes list | |
(diminish 'purpose-mode)) | |
(spaceline-compile)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment