From c7dc6f137911b09026c05b068f761e3f98a1533a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 20 Nov 2016 09:41:54 -0800 Subject: [Emacs] Use spaceline to manage the mode-line. We can have a fancy and more readable mode line with the help of spaceline. --- emacs.d/init.el | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/emacs.d/init.el b/emacs.d/init.el index f670f59..a3ec7a3 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -477,6 +477,44 @@ sh-indentation 2)) (add-hook 'sh-mode-hook 'set-sh-mode-indent) (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)) +(use-package spaceline + ;; configure the modeline + :ensure t) + +(use-package spaceline-config + ;; configuration for the modeline + :ensure nil + :after spaceline + + :config + ;; colors + (set-face-attribute 'powerline-active1 nil :background "grey22" :foreground "white" :inherit `mode-line) + (set-face-attribute 'powerline-active2 nil :background "grey40" :foreground "white" :inherit `mode-line) + (set-face-attribute 'powerline-inactive1 nil :background "grey22" :foreground "white" :inherit `mode-line-inactive) + (set-face-attribute 'powerline-inactive2 nil :background "grey40" :foreground "white" :inherit `mode-line-inactive) + (set-face-attribute (spaceline-highlight-face-default) nil :background "grey22" :foreground "white" :inherit `mode-line) + + (setq-default powerline-default-separator 'arrow) + + (spaceline-define-segment line-column + "The current line and column numbers." + "%2l : %2c") + + (spaceline-define-segment time + "The current time." + (format-time-string "%H:%M")) + + (spaceline-toggle-time-on) + (spaceline-toggle-buffer-encoding-abbrev-off) + (spaceline-toggle-flycheck-warning-off) + (spaceline-toggle-flycheck-error-off) + (spaceline-toggle-flycheck-info-off) + (spaceline-toggle-buffer-modified-on) + (spaceline-toggle-buffer-size-off) + (spaceline-toggle-buffer-position-off) + (spaceline-toggle-hud-off) + (spaceline-emacs-theme 'projectile-root 'time)) + (use-package swiper ;; install swiper -- cgit 1.4.1