aa0f146 docs(README): README.org -> README.md
~johnhamelink pushed to ~johnhamelink/dape-spinner git
388e262 docs: Also add the animation on a light theme to match the light theme of sourcehut
~johnhamelink pushed to ~johnhamelink/dape-spinner git
Dape Spinner is a small quality of life addon for the Dape debugger. Often, it can be useful to have a modest activity indicator whose movement indicates chatter. Dape Spinner adds an unobtrusive spinner to the modeline, which rotates in response to events received by Dape. After Dape stops receiving events, the spinner will timeout and hide again, keeping the modeline clean. If the DAP server is very chatty, and a large influx of events occurs in a short space of time, the spinner will throttle its spin rate, thus avoiding performance penalties.
Patches and PRs welcome!
This project started while working on a more ambitious project. I found
it quite useful to have a responsive widget to indicate chatter that
would get out of my way when not in use. The result is dape-spinner
.
Installation with use-package
on Emacs >= 30.0 is predictably simple:
(use-package dape-spinner
:ensure t
:vc (:url "https://git.sr.ht/~johnhamelink/dape-spinner" :rev :newest)
:config
(dape-spinner-setup))
Regardless of how you install, you can add dape-spinner
to the
mode-line with (dape-spinner-setup)
. The spinner will only be visible
when dape is active, and there has been event chatter that occurred
within the dape-spinner-mode-line-timeout
threshold. You can run a
dape session (even a failing one) and then evaluate
(dape-spinner-spin)
to manually verify the spinner is working.
This is a fairly simple package, but there are a few options to tweak.
dape-spinner-mode-line-spinner
. The spinner can have as many or as
few characters as you'd like. Here's some examples to try:-\|/
v<^>
┤┘┴└├┌┬┐
◢◣◤◥
◴◷◶◵
◐◓◑◒
▉▊▋▌▍▎▏▎▍▌▋▊▉
◇◈◆
⠁⠂⠄⡀⢀⠠⠐⠈
◜◝◞◟
.oO@*
dape-spinner-mode-line-timeout
.dape-spinner-spin
while dape is active.dape-spinner-time-min-interval
to allow the spinner
to spin at a faster rate - potentially at the cost of performance due
to the refreshing of the UI, By default, the spinner will spin one
full rotation per second.I wish to write up documentation for this project in org-mode, and a build script converts the org docs into Github-flavoured markdown, which is something SourceHut's web UI can render. I'll stop doing this if SourceHut ever manage to support org-mode in some meaningful way.