diff options
author | David Robillard <d@drobilla.net> | 2017-02-10 22:46:41 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-10 22:46:41 +0100 |
commit | 3d3fa7dd8c37807b2990e0945d759842db692c24 (patch) | |
tree | 5009c00dc27705e9c9487c499a5417ebbb52a8c8 /emacs.d/init.el | |
parent | b10f48513a2f2968e5ea3dede00c3aee026816b8 (diff) | |
download | dotfiles-3d3fa7dd8c37807b2990e0945d759842db692c24.tar.gz dotfiles-3d3fa7dd8c37807b2990e0945d759842db692c24.tar.bz2 dotfiles-3d3fa7dd8c37807b2990e0945d759842db692c24.zip |
Fancier modeline
Diffstat (limited to 'emacs.d/init.el')
-rw-r--r-- | emacs.d/init.el | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/emacs.d/init.el b/emacs.d/init.el index deea970..ec6d291 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -33,16 +33,40 @@ (defalias 'yes-or-no-p 'y-or-n-p) (delete-selection-mode 1) (winner-mode 1) -(setq-default tab-width 4) -(setq-default indent-tabs-mode nil) -(setq-default scroll-margin 3) +(setq-default tab-width 4) +(setq-default indent-tabs-mode nil) +(setq-default scroll-margin 3) (spaceline-emacs-theme) -(spaceline-toggle-buffer-size) -(spaceline-toggle-hud) +(spaceline-toggle-buffer-size-off) +(spaceline-toggle-hud-off) +(spaceline-toggle-buffer-encoding-abbrev-off) +(diminish 'auto-revert-mode "↻") +(diminish 'compilation-in-progress "⚙") +(diminish 'abbrev-mode "") +(diminish 'auto-fill-function "↵") +(setq spaceline-minor-modes-separator " ") + +(spaceline-define-segment version-control + "Version control information." + (when vc-mode + (powerline-raw + (s-trim (concat vc-mode + (when (buffer-file-name) + (pcase (vc-state (buffer-file-name)) + (`up-to-date " ") + (`edited " *") + (`added " +") + (`unregistered " ?") + (`removed " -") + (`needs-merge " !") + (`needs-update " ^") + (`ignored " I") + (_ " ?")))))))) + (spaceline-define-segment buffer-position "Buffer position in percent, padded to work around spaceline bug" - (format "%02d%%%% " (/ (* 100 (- (line-number-at-pos) 1)) - (count-lines (point-min) (point-max))))) + (format "%02d%%%% " (/ (* 100 (- (line-number-at-pos) 1)) + (count-lines (point-min) (point-max))))) ;;; Variables @@ -130,7 +154,7 @@ '(magit-diff-refine-hunk (quote all)) '(menu-bar-mode nil) '(pdf-view-midnight-colors (quote ("#C3D1D1" . "#141414"))) - '(powerline-default-separator (quote slant)) + '(powerline-default-separator nil) '(quack-pretty-lambda-p t) '(quack-run-scheme-always-prompts-p nil) '(savehist-mode t) @@ -222,11 +246,14 @@ '(magit-section-highlight ((t (:background "grey15")))) '(minibuffer-prompt ((((background dark)) (:foreground "white")))) '(mode-line ((t (:background "#2D3232" :foreground "#AFB3B2" :box (:line-width 2 :color "#1A1A1A"))))) - '(mode-line-inactive ((t (:inherit mode-line :background "#111" :foreground "#4F5352" :box (:line-width 2 :color "#141414"))))) + '(mode-line-buffer-id ((t (:weight bold)))) + '(mode-line-buffer-id-inactive ((t (:inherit mode-line-buffer-id :foreground "red")))) + '(mode-line-inactive ((t (:inherit mode-line :background "#222727" :foreground "#424747")))) '(nobreak-space ((((class color) (min-colors 88)) (:inherit escape-glyph :underline t)))) - '(powerline-active1 ((t (:inherit mode-line :background "#272A2A")))) + '(powerline-active1 ((t (:inherit mode-line :background "#222727")))) '(powerline-active2 ((t (:inherit mode-line :background "#2D3232")))) - '(powerline-inactive2 ((t (:inherit mode-line-inactive :background "#272A2A")))) + '(powerline-inactive1 ((t (:inherit mode-line-inactive :background "#121717")))) + '(powerline-inactive2 ((t (:inherit mode-line-inactive :background "#1D2222")))) '(region ((t (:background "#455900")))) '(smerge-refined-change ((t (:background "grey20")))) '(spaceline-highlight-face ((t (:background "#272A2A" :foreground "#FFFFFF" :inherit (quote mode-line))))) @@ -404,7 +431,7 @@ "/" (number-to-string (pdf-cache-number-of-pages))) mode-line-position - "%l:%2c")) + "%l:%c")) ;; Associations |