Replace popwin with shackle; refactor window/buffer defuns

This commit is contained in:
Henrik Lissner 2015-12-21 05:44:44 -05:00
parent 6b38183786
commit fca83ffc19
10 changed files with 508 additions and 282 deletions

View file

@ -491,41 +491,7 @@ Supports both Emacs and Evil cursor conventions."
(global :when active)
("%l/%c" *buffer-position)
*hud
))
(spaceline-define-segment helm-id
"Number of helm candidates."
(buffer-name)
:when (bound-and-true-p helm-alive-p)
:tight t)
(spaceline-define-segment helm-number
"Number of helm candidates."
(format "%d/%s (%s total)"
(helm-candidate-number-at-point)
(helm-get-candidate-number t)
(helm-get-candidate-number))
:when (bound-and-true-p helm-alive-p))
(spaceline-define-segment helm-help
"Helm keybindings help."
(-interleave
(mapcar (lambda (s)
(propertize (substitute-command-keys s) 'face 'bold))
'("\\<helm-map>\\[helm-help]"
"\\<helm-map>\\[helm-select-action]"
"\\<helm-map>\\[helm-maybe-exit-minibuffer]/F1/F2..."))
'("(help)" "(actions)" "(action)"))
:when (bound-and-true-p helm-alive-p))
(defun narf|helm-mode-line (source &optional force)
"Set up a custom helm modeline."
(setq spaceline--helm-current-source source
mode-line-format '("%e" (:eval (spaceline--prepare
'(helm-number helm-id)
'(helm-help)))))
(when force (force-mode-line-update)))
(advice-add 'helm-display-mode-line :after 'narf|helm-mode-line))
)))
(provide 'core-ui)
;;; core-ui.el ends here