diff options
author | Franck Cuny <franck.cuny@gmail.com> | 2016-11-20 09:41:54 -0800 |
---|---|---|
committer | Franck Cuny <franck.cuny@gmail.com> | 2016-11-20 09:41:54 -0800 |
commit | c7dc6f137911b09026c05b068f761e3f98a1533a (patch) | |
tree | f05bbe886f8c2197fdbb55cd16ab90aa5aee6e36 | |
parent | [Emacs] Use a symbol for the mode name for Magit. (diff) | |
download | emacs.d-c7dc6f137911b09026c05b068f761e3f98a1533a.tar.gz |
[Emacs] Use spaceline to manage the mode-line.
We can have a fancy and more readable mode line with the help of spaceline.
-rw-r--r-- | emacs.d/init.el | 38 |
1 files changed, 38 insertions, 0 deletions
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 |