#animation #screensaver #terminal #termination #ctrl-c #duration #visual

app coinflip_animation

A simple coinflip animation in the terminal, as a screensaver or just simply to look at

7 releases

0.2.1 Mar 17, 2024
0.2.0 Mar 17, 2024
0.1.4 Mar 12, 2024

#116 in Video

Download history 2/week @ 2024-07-18 6/week @ 2024-07-25

248 downloads per month

MIT license

9KB
193 lines

Run with coinflip_animation DURATION COINSIZE. Running without arguments will default to 10 seconds and a diameter scaled to your terminal. Running with one argument will specify the duration, and scale the diameter. When specified, the diameter is approximately (COINSIZE * 2).

OTHER DETAILS:

The actual animation in question will be centered on the screen, and lock the terminal for the duration of the animation.

Each terminal will have different spacing and character width:height ratios, so it may not appear exactly circular. If you need/want, head over to the docs, copy & change the source code to get a better visual. Make sure to add the ctrlc dependency with the flag 'features="termination"'.

Sending Ctrl-C will stop the animation and show the cursor again.

DISCLAIMER: This program is not intended for serious use.

Dependencies

~1.5–8MB
~70K SLoC