spinner.el
spinner.el copied to clipboard
More spinners
I've come across https://github.com/FGRibreau/spinners just now which looks like a good source to steal some more spinner patterns.
Maybe the simple way is making spinner-types
customizable. @Malabarba Am I right?
https://github.com/Malabarba/spinner.el/blob/a5d721eea578abb0f13e2a7ba668033d6009f38f/spinner.el#L103
Making it customizable would allow people to change existing spinners, but wouldn't allow them to add new ones.
That said, the variable is there only to provide a few convenient spinners for package authors to use. But the packages are free to call spinner-create
with a vector of strings and that vector will be used as the spinner.
Hmm, I'm thinking perhaps spinner-types
includes built-in types and user types. Of course, calling spinner-create
is fine.
It's pretty easy to generalize a spinner "generator" too, see: https://gist.github.com/gonewest818/42b14e2dac632857b871754d6f6b9614
Where the default progress-bar
can be produced with:
(generate "====" "[" "]" 4)
of course the input string is up to you. Other animations are possible, and even a rolling "marquee":
(generate "Please wait... I'm working on it" "[" "]" 6)
;; => ["[Please]"
;; "[lease ]"
;; "[ease w]"
;; "[ase wa]"
;; "[se wai]"
;; "[e wait]"
;; "[ wait.]"
;; "[wait..]"
;; "[ait...]"
;; etc. ]