Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hschne/spinny
Another spinner written in bash. Customizable and pretty :lipstick:
https://github.com/hschne/spinny
Last synced: 23 days ago
JSON representation
Another spinner written in bash. Customizable and pretty :lipstick:
- Host: GitHub
- URL: https://github.com/hschne/spinny
- Owner: hschne
- License: mit
- Created: 2019-06-19T12:38:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-03T21:46:09.000Z (over 5 years ago)
- Last Synced: 2024-10-09T22:36:23.820Z (about 1 month ago)
- Language: Shell
- Size: 2.44 MB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Spinny
Yet another terminal spinner written in Bash. Customizable and pretty :lipstick:
## How do I use this?
Simple. First download spinny:
```
wget https://raw.githubusercontent.com/hschne/spinny/master/spinny.sh
```To use it in your shell scripts import it, and you are good to go:
```
source spinny.shprintf "Starting some long running process now... "
spinny::start
sleep 3
spinny::stop
printf "Done!\n"
```Spinny is versatile and can animate pretty much anything you throw at it. The variables `SPINNY_FRAMES` and `SPINNY_DELAY` can be used to change the look of the spinner. The code below will render three dots instead:
```
SPINNY_FRAMES=(. .. ...)
SPINNY_DELAY=0.1
printf "Fancy spinners right here: "
spinny::start
sleep 3
spinny::stop
printf " \n"
```Have a look at [the demo](demo.sh) for more examples or run it yourself:
```
chmod +x demo.sh && ./demo.sh
```## Contributing
I'm new to this entire bash thing. While I try and keep things portable and dependencies to a minimum, I can't guarantee that Spinny will work on your particular machine.
If you encounter any errors or have ideas for improvements feel free to file an issue! :heart:
## License
[MIT](LICENSE) (c) [@hschne](https://github.com/hschne)