This is my attempt to run some animation while there is no I/O on a terminal. It
runs on FreeBSD and macOS, should also work on Linux. Download it from GitLab.
Build
$ make
Install
$ make install clean
Run
$ $ ascsaver -f /usr/local/share/ascsaver.art/star_wars.vt -b -s 128000 -r 14
And don’t touch the keyboard for a minute to see the Star Wars episode IV running in your terminal!
Options
Usage:
ascsaver [-b][-i n][-p n][-s n][-f ascii.art][-h]
[-b] Do not attempt to restore the screen after show
[-i n] Wait n minutes (default 1) before running a screensaver show
[-p n] Pause between shows in seconds, default 10
[-r n] Number of rows in an animation frame, default 24
[-s n] Animation speed n in microseconds, default 64000
[-f ascii.art] A file with ASCII art animation
[-h] This message
Other interesting invocations:
$ ascsaver -f /usr/local/share/ascsaver.art/globe.vt -p 0
Also, if you are an adult, dogs.vt looks very nice:
$ ascsaver -f /usr/local/share/ascsaver.art/dogs.vt -r 1 -p 5 -s 32000
Otherwise, better see the inspiring nasa.vt animation:
$ ascsaver -f /usr/local/share/ascsaver.art/nasa.vt -s 128000
The ascsaver.art directory contains several examples of good old school ASCII-art animation files from the Artscene collection, as well as a dump of Star Wars episode IV telnet session from towel.blinkenlights.nl:23
Pingback: ASCII Saver – Screensaver for terminals | #define me human – Linux Shtuff
Hi – this also builds on NetBSD which uses util.h but you should include errno.h instead of sys/errno.h (at least on Net).
Also I think you need __OpenBSD__ rather than _OpenBSD__
diff –git a/ascsaver.c b/ascsaver.c
index 075d37d..8c70544 100644
— a/ascsaver.c
+++ b/ascsaver.c
@@ -38,7 +38,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -51,10 +51,10 @@
#include
#ifdef __FreeBSD__
– #include
+#include
#endif
-#if defined(_OpenBSD__) || defined(__APPLE__)
+#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__NetBSD__)
#include
#endif
All the best
Chris
LikeLike
Super! Valuable patch, appreciate it 🙂
LikeLike