(active? spinner)
Is the given spinner active?
Is the given spinner active?
(create!)
(create! options)
Creates a spinner and returns it, but does not start it.
Optionally accepts an options map - supported options are: { :frames - the frames (array of strings) to use for the spinner (default is (:ascii-spinner styles)) :delay - the delay (in ms) between frames (default is 100ms) :fg-colour / :fg-color - the foregound colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values :bg-colour / :bg-colour - the background colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values :attribute - the attribute of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#attributes for allowed values }
Note: this method has the side effect of enabling JANSI - see https://github.com/xsc/jansi-clj#globally-enabledisable-ansi-codes
Creates a spinner and returns it, but does not start it. Optionally accepts an options map - supported options are: { :frames - the frames (array of strings) to use for the spinner (default is (:ascii-spinner styles)) :delay - the delay (in ms) between frames (default is 100ms) :fg-colour / :fg-color - the foregound colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values :bg-colour / :bg-colour - the background colour of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values :attribute - the attribute of the spinner (default is :default) - see https://github.com/xsc/jansi-clj#attributes for allowed values } Note: this method has the side effect of enabling JANSI - see https://github.com/xsc/jansi-clj#globally-enabledisable-ansi-codes
(create-and-start!)
(create-and-start! options)
Creates and starts a spinner, returning it.
Creates and starts a spinner, returning it.
The default delay between frames (in milliseconds), if one isn't specified.
The default delay between frames (in milliseconds), if one isn't specified.
The default spinner style used, if one isn't specified. This is known to function on all platforms.
The default spinner style used, if one isn't specified. This is known to function on all platforms.
Are we running on Windows? If so, best to stick to the default spinner style. 😢
Are we running on Windows? If so, best to stick to the default spinner style. 😢
(print & more)
Schedules the given values for printing (ala clojure.core/print), without interrupting the active spinner. Notes:
Schedules the given values for printing (ala clojure.core/print), without interrupting the active spinner. Notes: * will only produce output if a spinner is active * output is emitted in between 'frames' of the spinner, so may not appear immediately * values are space delimited (as in clojure.core/print) - use clojure.core/str for finer control * no newlines are inserted - if message(s) are to appear on new lines the caller needs to include \newline in the value(s)
(spin! f)
(spin! f options)
Creates and starts a spinner, calls fn f, then stops the spinner. Returns the result of f.
Creates and starts a spinner, calls fn f, then stops the spinner. Returns the result of f.
(stop! spinner)
Stops the given spinner. Note: after being stopped, a spinner cannot be restarted.
Stops the given spinner. Note: after being stopped, a spinner cannot be restarted.
A selection of predefined styles of spinner. Only ASCII spinners are known to work reliably - other styles depend on the operating system, terminal font & encoding, phase of the moon, and how long since your dog last pooped.
A selection of predefined styles of spinner. Only ASCII spinners are known to work reliably - other styles depend on the operating system, terminal font & encoding, phase of the moon, and how long since your dog last pooped.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close