From 0fc730ec8e058607b05185e1a36b22615ffbae40 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 18 Oct 2021 14:48:29 -0400 Subject: Add shotty -t to animate (crudely) between snapshots --- bin/shotty.l | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'bin/shotty.l') diff --git a/bin/shotty.l b/bin/shotty.l index 3d1d50c0..93e7f0ee 100644 --- a/bin/shotty.l +++ b/bin/shotty.l @@ -507,8 +507,9 @@ int main(int argc, char *argv[]) { bool debug = false; bool size = false; bool hide = false; + int interval = 0; - for (int opt; 0 < (opt = getopt(argc, argv, "Bb:df:h:insw:"));) { + for (int opt; 0 < (opt = getopt(argc, argv, "Bb:df:h:inst:w:"));) { switch (opt) { break; case 'B': bright = true; break; case 'b': defaultBg = atoi(optarg); @@ -518,6 +519,7 @@ int main(int argc, char *argv[]) { break; case 'i': colors = true; break; case 'n': hide = true; break; case 's': size = true; + break; case 't': interval = atoi(optarg); break; case 'w': cols = atoi(optarg); break; default: return EX_USAGE; } @@ -559,4 +561,25 @@ int main(int argc, char *argv[]) { } if (hide) mode &= ~Cursor; if (!mc) html(); + + if (interval) { + printf( + Q( + + ), + interval + ); + } } -- cgit 1.4.1