Skip to content

Commit 544dfca

Browse files
authored
Merge pull request #75 from attogram/fix-casts-tour-and-tests
Fix cursor in casts, tour script, and test suite setup
2 parents 35ba3e4 + b8b7904 commit 544dfca

35 files changed

Lines changed: 2781 additions & 116 deletions

gallery/alpha/alpha.cast

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1-
{"version": 2, "width": 80, "height": 20, "timestamp": 1, "env": {"SHELL": "/bin/bash", "TERM": "linux"}}
2-
[0.6, "o", "mock output"]
1+
{"version": 2, "width": 80, "height": 24, "timestamp": 1757617228, "env": {"SHELL": "/bin/bash", "TERM": "tmux-256color"}}
2+
[0.743737, "o", "\u001b[23;64H\u001b[38;5;10m█"]
3+
[1.446798, "o", "\u001b[14;26H\u001b[38;5;208m█"]
4+
[2.150023, "o", "\u001b[1;9H\u001b[38;5;23m█"]
5+
[2.853096, "o", "\u001b[15;28H\u001b[38;5;31m█"]
6+
[3.556347, "o", "\u001b[1;72H\u001b[38;5;60m█"]
7+
[4.259618, "o", "\u001b[17;15H\u001b[38;5;128m█"]
8+
[4.963239, "o", "\u001b[20;63H\u001b[38;5;177m█"]
9+
[5.666817, "o", "\u001b[14;34H\u001b[38;5;233m█"]
10+
[6.370677, "o", "\u001b[17;17H\u001b[38;5;226m█"]
11+
[7.07389, "o", "\u001b[20;74H\u001b[38;5;169m█"]
12+
[7.77735, "o", "\u001b[24;62H\u001b[38;5;65m█"]
13+
[8.480983, "o", "\u001b[12;14H\u001b[38;5;208m█"]
14+
[9.184132, "o", "\u001b[5;15H\u001b[38;5;124m█"]
15+
[9.887653, "o", "\u001b[21;62H\u001b[38;5;176m█"]

gallery/bouncing/bouncing.cast

Lines changed: 284 additions & 2 deletions
Large diffs are not rendered by default.

gallery/bouncing/bouncing.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ NUM_OBJECTS=5
1111
SLEEP_TIME=0.03
1212

1313
_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
14+
tput cnorm # show cursor
15+
tput sgr0 # restore screen
1416
exit 0
1517
}
1618

17-
trap _cleanup_and_exit EXIT INT TERM QUIT # Ctrl‑C
19+
trap _cleanup_and_exit SIGINT # Ctrl‑C
1820

1921
#
2022
# Main animation loop

gallery/cutesaver/cutesaver.cast

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
{"version": 2, "width": 80, "height": 20, "timestamp": 1, "env": {"SHELL": "/bin/bash", "TERM": "linux"}}
2-
[0.6, "o", "mock output"]
1+
{"version": 2, "width": 80, "height": 24, "timestamp": 1757617249, "env": {"SHELL": "/bin/bash", "TERM": "tmux-256color"}}
2+
[0.529739, "o", "You deserve something cute to look at. A mirror would help\r\nwith that, but I'm just a lowly command line application...\r\n\r\n"]
3+
[1.03288, "o", "ASCII to the rescue!\r\n"]
4+
[1.536283, "o", "\r\nYou're about to get put into an infinite loop of cuteness.\r\n"]
5+
[2.039556, "o", "\r\nLeave it running for as long as you like. To exit, just press\r\nCTRL+C at any time and you'll drop back to the shell.\r\n\r\n"]
6+
[4.045815, "o", "\u001b[40m"]
7+
[4.048265, "o", "\u001b[H\u001b[J\u001b[3J"]
8+
[4.050808, "o", "\u001b[?25l"]
9+
[4.059175, "o", "\u001b[H\u001b[J\u001b[3J"]
10+
[4.06266, "o", "((\r\n\\\\``.\r\n\\_`.``-. \r\n( `.`.` `._ \r\n `._`-. `._ \r\n \\`--. ,' `. \r\n `--._ `. .`. \r\n `--.--- `. ` `. \r\n `.-- `; .`._ \r\n :- : ;. `.__,.,__ __ \r\n `\\ : ,-( ';o`>.\r\n `-.`: ,' `._ .: (,-`,\r\n \\ ; ;. ,: \r\n ,\"`-._>-: ;,' `---.,---.\r\n `>'\" \"-` ,' \"\":::::\".. `-.\r\n `;\"'_, (\\`\\ _ `:::::::::::'\" `---.\r\n -hrr- `-(_,' -'),)\\`. _ .::::\"' `----._,-\"\")\r\n \\_,': `.-' `-----' `--;-. `. ``.`--.____/ \r\n `-^--' \\(-. `.``-.`-=:-.__)\r\n ` `.`.`._`.-._`--.)\r\n `-^---^--.`--\r\n\r\n\r\n"]

gallery/cutesaver/cutesaver.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
# Anyway, on with the cuteness. Let's load some title art.
1414

1515
_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
16+
tput cnorm # show cursor
17+
tput sgr0 # restore screen
1618
exit 0
1719
}
18-
trap _cleanup_and_exit EXIT INT TERM QUIT # Catch all common exit signals
20+
trap _cleanup_and_exit SIGINT # Catch all common exit signals
1921

2022
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit
2123

gallery/fireworks/fireworks.cast

Lines changed: 129 additions & 2 deletions
Large diffs are not rendered by default.

gallery/fireworks/fireworks.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ DELAY_DISSIPATE=0.2
1515
DELAY_BETWEEN=0.5
1616

1717
_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
18+
tput cnorm # show cursor
19+
tput sgr0 # restore screen
1820
exit 0
1921
}
2022

21-
trap _cleanup_and_exit EXIT INT TERM QUIT # Ctrl‑C
23+
trap _cleanup_and_exit SIGINT # Ctrl‑C
2224

2325
#
2426
# Draw the full firework at once. Used for the dissipation effect.

gallery/life/life.cast

Lines changed: 37 additions & 2 deletions
Large diffs are not rendered by default.

gallery/life/life.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cleanup() {
6262
exit 0
6363
}
6464

65-
trap cleanup EXIT INT TERM QUIT # Set up cleanup on exit/interrupt
65+
trap cleanup SIGINT # Set up cleanup on exit/interrupt
6666

6767

6868
init_grid() {

gallery/matrix/matrix.cast

Lines changed: 464 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)