Indetermine progress indicator (aka a "spinner"), for the case where the progress of a long-running task cannot be determined.
Indetermine progress indicator (aka a "spinner"), for the case where the progress of a long-running task cannot be determined.
(active?)
Is an indeterminate progress indicator active (currently running)?
Is an indeterminate progress indicator active (currently running)?
(animate! & body)
Wraps the given forms in the indeterminate progress indicator. If the first form is the keyword :opts
, the second form must be a map, optionally containing these keys:
:frames - the frames (a sequence of strings) to use for the indeterminate progress indicator (default is (:ascii-spinner styles))
:delay - the delay (in ms) between frames (default is 100ms)
:fg-colour - the foregound colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent
:bg-colour - the background colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent
:attributes - the attributes of the indeterminate progress indicator (default is [:default]) - see https://github.com/xsc/jansi-clj#attributes for allowed values
Wraps the given forms in the indeterminate progress indicator. If the first form is the keyword `:opts`, the second form must be a map, optionally containing these keys: :frames - the frames (a sequence of strings) to use for the indeterminate progress indicator (default is (:ascii-spinner styles)) :delay - the delay (in ms) between frames (default is 100ms) :fg-colour - the foregound colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent :bg-colour - the background colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent :attributes - the attributes of the indeterminate progress indicator (default is [:default]) - see https://github.com/xsc/jansi-clj#attributes for allowed values
(animatef! f)
(animatef! opts f)
Starts the indeterminate progress indicator, calls fn f (a function of zero parameters), then stops it. Returns the result of f.
Note that the animate!
macro is preferred over this function.
opts is a map, optionally containing these keys: :frames - the frames (a sequence of strings) to use for the indeterminate progress indicator (default is (:ascii-spinner styles)) :delay - the delay (in ms) between frames (default is 100ms) :fg-colour - the foregound colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent :bg-colour - the background colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent :attributes - the attributes of the indeterminate progress indicator (default is [:default]) - see https://github.com/xsc/jansi-clj#attributes for allowed values
Starts the indeterminate progress indicator, calls fn f (a function of zero parameters), then stops it. Returns the result of f. Note that the `animate!` macro is preferred over this function. opts is a map, optionally containing these keys: :frames - the frames (a sequence of strings) to use for the indeterminate progress indicator (default is (:ascii-spinner styles)) :delay - the delay (in ms) between frames (default is 100ms) :fg-colour - the foregound colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent :bg-colour - the background colour of the indeterminate progress indicator (default is :default) - see https://github.com/xsc/jansi-clj#colors for allowed values, and prefix with bright- to get the bright equivalent :attributes - the attributes of the indeterminate progress indicator (default is [:default]) - see https://github.com/xsc/jansi-clj#attributes for allowed values
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 indeterminate progress indicator style used, if one isn't specified. This is known to function on all platforms.
The default indeterminate progress indicator style used, if one isn't specified. This is known to function on all platforms.
(print & more)
Schedules the given values for printing (ala clojure.core/print), since clojure.core/print (and similar output fns) interfere with an active indeterminate progress indicator.
Notes:
Schedules the given values for printing (ala clojure.core/print), since clojure.core/print (and similar output fns) interfere with an active indeterminate progress indicator. Notes: * output is emitted in between 'frames' of the progress indicator, 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)
(start!)
(start! opts)
Not intended for public use. Use animate! or animatef! instead.
Not intended for public use. Use animate! or animatef! instead.
(state)
What state is the indeterminate progress indicator currently in? One of:
What state is the indeterminate progress indicator currently in? One of: * :inactive * :active * :shutting-down
(stop!)
Not intended for public use. Use animate! or animatef! instead.
Not intended for public use. Use animate! or animatef! instead.
A selection of predefined styles of indeterminate progress indicators. Only ASCII progress indicators 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 indeterminate progress indicators. Only ASCII progress indicators 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