Skip to content

Instantly share code, notes, and snippets.

@bmag
Created May 11, 2016 15:27
Show Gist options
  • Save bmag/417dbfffbc5b070b9cb0cfc8bf0b6768 to your computer and use it in GitHub Desktop.
Save bmag/417dbfffbc5b070b9cb0cfc8bf0b6768 to your computer and use it in GitHub Desktop.
new spaceline conf
(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