summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-10-18 21:53:54 -0400
committerJune McEnroe <june@causal.agency>2021-10-18 21:53:54 -0400
commit706b911fadc089af107b06d5f2cecc1d4e8c58e2 (patch)
treeaa894ba14354b7e0e22fc4e5179ce8d9d6be7bff /bin
parentAdd shotty -t to animate (crudely) between snapshots (diff)
downloadsrc-706b911fadc089af107b06d5f2cecc1d4e8c58e2.tar.gz
src-706b911fadc089af107b06d5f2cecc1d4e8c58e2.zip
Revert "Add shotty -t to animate (crudely) between snapshots"
This reverts commit e52b86b69b9dc6a7b7ec9d578c20d88fc1ccb330.

It's mostly irrelevant to how shotty actually functions so I think
it would be better done externally. Reverting just to keep the dumb
JavaScript in history.
Diffstat (limited to '')
-rw-r--r--bin/man1/shotty.17
-rw-r--r--bin/shotty.l25
2 files changed, 1 insertions, 31 deletions
diff --git a/bin/man1/shotty.1 b/bin/man1/shotty.1
index 18cf52f6..0a3bd127 100644
--- a/bin/man1/shotty.1
+++ b/bin/man1/shotty.1
@@ -12,7 +12,6 @@
 .Op Fl b Ar bg
 .Op Fl f Ar fg
 .Op Fl h Ar rows
-.Op Fl t Ar ms
 .Op Fl w Ar cols
 .Op Ar file
 .
@@ -83,12 +82,6 @@ Hide the cursor.
 Copy the terminal size
 from the current terminal.
 .
-.It Fl t Ar ms
-Animate between snapshots
-at an interval of
-.Ar ms
-milliseconds.
-.
 .It Fl w Ar cols
 Set the terminal width.
 The default is 80.
diff --git a/bin/shotty.l b/bin/shotty.l
index 1655a09a..070022a2 100644
--- a/bin/shotty.l
+++ b/bin/shotty.l
@@ -507,9 +507,8 @@ 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:inst:w:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "Bb:df:h:insw:"));) {
 		switch (opt) {
 			break; case 'B': bright = true;
 			break; case 'b': defaultBg = atoi(optarg);
@@ -519,7 +518,6 @@ 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;
 		}
@@ -561,25 +559,4 @@ int main(int argc, char *argv[]) {
 	}
 	if (hide) mode &= ~Cursor;
 	if (!mc) html();
-
-	if (interval) {
-		printf(
-			Q(
-				<script>
-				let frames = document.querySelectorAll("pre");
-				let frame = 0;
-				function animate() {
-					for (let i = 0; i < frames.length; ++i) {
-						frames[i].hidden = (i != frame);
-					}
-					frame++;
-					if (frame == frames.length) frame = 0;
-				}
-				animate();
-				setInterval(animate, %d);
-				</script>
-			),
-			interval
-		);
-	}
 }
a371650044d3cfbc3ce9b9e67493916eb&follow=1'>Install mandoc on macOSJune McEnroe 2020-09-11Rewrite install script yet againJune McEnroe 2020-09-11Remove NetBSD from install scriptJune McEnroe I never use it. 2020-09-11Use MacPorts rather than pkgsrcJune McEnroe My system is probably such a mess now... 2020-09-11Add debian VM name to sshJune McEnroe 2020-09-11Add influencer tweetJune McEnroe 2020-09-10Add The Kingdom of GodsJune McEnroe Reading has really slowed down :( 2020-09-07Add SunglassesJune McEnroe An IRC find. 2020-09-06Add Between the BreathsJune McEnroe One of those good songs from a soundtrack of a film that probably isn't? The summary sounds a lot more interesting than the title implies, at least. 2020-09-04Open /dev/tty in nudgeJune McEnroe This makes it work even when it's run connected to a pipe, i.e. as the notify command of catgirl... 2020-09-04Add nudgeJune McEnroe 2020-09-03Build fbclock with -lzJune McEnroe I guess this got lost somewhere, long ago... 2020-08-29Add tweets from retweetsJune McEnroe