Polish mode-line

This commit is contained in:
Henrik Lissner 2016-02-26 09:43:03 -05:00
parent e15b31e37c
commit 56700a6417

View file

@ -101,7 +101,7 @@
;; Fade out when unfocused ;;;;;;;;;;;;; ;; Fade out when unfocused ;;;;;;;;;;;;;
(add-hook! focus-in (set-frame-parameter nil 'alpha 100)) (add-hook! focus-in (set-frame-parameter nil 'alpha 100))
(add-hook! focus-out (set-frame-parameter nil 'alpha 60)) (add-hook! focus-out (set-frame-parameter nil 'alpha 75))
;; Plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-package visual-fill-column :defer t) (use-package visual-fill-column :defer t)
@ -316,7 +316,7 @@ anzu to be enabled."
iedit." iedit."
(let ((this-oc (iedit-find-current-occurrence-overlay)) (let ((this-oc (iedit-find-current-occurrence-overlay))
(length (or (ignore-errors (length iedit-occurrences-overlays)) 0))) (length (or (ignore-errors (length iedit-occurrences-overlays)) 0)))
(format "%s/%s" (format " %s/%s "
(save-excursion (save-excursion
(unless this-oc (unless this-oc
(iedit-prev-occurrence) (iedit-prev-occurrence)
@ -327,6 +327,7 @@ iedit."
"-")) "-"))
length)) length))
:when (bound-and-true-p iedit-mode) :when (bound-and-true-p iedit-mode)
:tight t
:face (if active 'mode-line-count-face 'mode-line-inactive) :face (if active 'mode-line-count-face 'mode-line-inactive)
:skip-alternate t) :skip-alternate t)
@ -338,11 +339,12 @@ iedit."
(cons (line-beginning-position) (line-end-position)))) (cons (line-beginning-position) (line-end-position))))
(pattern (car-safe (evil-delimited-arguments evil-ex-argument 2)))) (pattern (car-safe (evil-delimited-arguments evil-ex-argument 2))))
(if pattern (if pattern
(format "%s matches" (format " %s matches "
(count-matches pattern (car range) (cdr range)) (count-matches pattern (car range) (cdr range))
evil-ex-argument) evil-ex-argument)
" ... ")) " ... "))
:when (and (evil-ex-p) (evil-ex-hl-active-p 'evil-ex-substitute)) :when (and (evil-ex-p) (evil-ex-hl-active-p 'evil-ex-substitute))
:tight t
:face (if active 'mode-line-count-face 'mode-line-inactive) :face (if active 'mode-line-count-face 'mode-line-inactive)
:skip-alternate t)) :skip-alternate t))
@ -436,7 +438,7 @@ Supports both Emacs and Evil cursor conventions."
:when (and (bound-and-true-p flycheck-mode) :when (and (bound-and-true-p flycheck-mode)
(or flycheck-current-errors (or flycheck-current-errors
(eq 'running flycheck-last-status-change))) (eq 'running flycheck-last-status-change)))
:tight-left t :tight t
:skip-alternate t)) :skip-alternate t))
(spaceline-define-segment *hud (spaceline-define-segment *hud
@ -448,7 +450,7 @@ Supports both Emacs and Evil cursor conventions."
(spaceline-install (spaceline-install
;; Left side ;; Left side
'(*macro-recording '(*macro-recording
(((*anzu *iedit *evil-substitute) *flycheck) ((*anzu *iedit *evil-substitute *flycheck)
:fallback *buffer-size) :fallback *buffer-size)
(*buffer-path *remote-host) (*buffer-path *remote-host)
*buffer-modified *buffer-modified