core: display a numerical progression in mode-line

Represents the number of packages to configure.
This commit is contained in:
syl20bnr 2016-06-13 00:56:25 -04:00
parent e1826c9382
commit 8368be3c89
2 changed files with 14 additions and 6 deletions

View File

@ -486,13 +486,20 @@ border."
`spacemacs--loading-dots-chunk-threshold'."
(when dotspacemacs-loading-progress-bar
(setq spacemacs-loading-counter (1+ spacemacs-loading-counter))
(setq spacemacs-loading-value (1+ spacemacs-loading-value))
(when (>= spacemacs-loading-counter spacemacs-loading-dots-chunk-threshold)
(setq spacemacs-loading-counter 0)
(setq spacemacs-loading-string
(concat spacemacs-loading-string
(make-string spacemacs-loading-dots-chunk-size
spacemacs-loading-char)))
(spacemacs-buffer/set-mode-line spacemacs-loading-string)
(let ((suffix (format "> %s/%s" spacemacs-loading-value
(length configuration-layer--packages))))
(setq spacemacs-loading-counter 0)
(setq spacemacs-loading-string
(make-string
(- (* spacemacs-loading-dots-chunk-size
(floor (/ spacemacs-loading-value
spacemacs-loading-dots-chunk-threshold)))
(length suffix))
spacemacs-loading-char))
(spacemacs-buffer/set-mode-line (concat spacemacs-loading-string
suffix)))
(spacemacs//redisplay))))
(defmacro spacemacs//insert--shortcut (shortcut-char search-label

View File

@ -39,6 +39,7 @@
(defvar spacemacs-loading-char ?█)
(defvar spacemacs-loading-string "")
(defvar spacemacs-loading-counter 0)
(defvar spacemacs-loading-value 0)
;; (defvar spacemacs-loading-text "Loading")
;; (defvar spacemacs-loading-done-text "Ready!")
(defvar spacemacs-loading-dots-chunk-count 3)