branch: master commit 9136c93cbe44ed15df4c51a1f9310ebea512dcfe Author: Artur Malabarba <bruce.connor...@gmail.com> Commit: Artur Malabarba <bruce.connor...@gmail.com>
Readme --- README.org | 23 +++++++++++++++++++++++ spinner.el | 26 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org new file mode 100644 index 0000000..0c680c0 --- /dev/null +++ b/README.org @@ -0,0 +1,23 @@ +#+TITLE: spinner.el + +Add spinners and progress-bars to the mode-line for ongoing operations. + +* Usage + +1. Add ~(spinner "1.0")~ to your package’s dependencies. + +2. Call ~(spinner-start)~ and a spinner will be added to the mode-line. + +3. Call ~(spinner-stop)~ on the same buffer when you want to remove it. + +* Behavior + +The default spinner is a line drawing that rotates. You can pass an +argument to ~spinner-start~ to specify which spinner you want. All +possibilities are listed in the ~spinner-types~ variable, but here are +a few examples for you to try: + +- ~(spinner-start 'vertical-breathing 10)~ +- ~(spinner-start 'minibox)~ +- ~(spinner-start 'moon)~ +- ~(spinner-start 'triangle)~ diff --git a/spinner.el b/spinner.el index 4297b24..06b0d83 100644 --- a/spinner.el +++ b/spinner.el @@ -20,8 +20,30 @@ ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - -;; Run `(spinner-start)' to see the effect. +;; 1 Usage +;; ═══════ +;; +;; 1. Add `(spinner "1.0")' to your package’s dependencies. +;; +;; 2. Call `(spinner-start)' and a spinner will be added to the +;; mode-line. +;; +;; 3. Call `(spinner-stop)' on the same buffer when you want to remove +;; it. +;; +;; +;; 2 Behavior +;; ══════════ +;; +;; The default spinner is a line drawing that rotates. You can pass an +;; argument to `spinner-start' to specify which spinner you want. All +;; possibilities are listed in the `spinner-types' variable, but here are +;; a few examples for you to try: +;; +;; • `(spinner-start 'vertical-breathing 10)' +;; • `(spinner-start 'minibox)' +;; • `(spinner-start 'moon)' +;; • `(spinner-start 'triangle)' ;;; Code: