Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions gallery/alpha/alpha.cast
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
{"version": 2, "width": 80, "height": 20, "timestamp": 1, "env": {"SHELL": "/bin/bash", "TERM": "linux"}}
[0.6, "o", "mock output"]
{"version": 2, "width": 80, "height": 24, "timestamp": 1757617228, "env": {"SHELL": "/bin/bash", "TERM": "tmux-256color"}}
[0.743737, "o", "\u001b[23;64H\u001b[38;5;10m█"]
[1.446798, "o", "\u001b[14;26H\u001b[38;5;208m█"]
[2.150023, "o", "\u001b[1;9H\u001b[38;5;23m█"]
[2.853096, "o", "\u001b[15;28H\u001b[38;5;31m█"]
[3.556347, "o", "\u001b[1;72H\u001b[38;5;60m█"]
[4.259618, "o", "\u001b[17;15H\u001b[38;5;128m█"]
[4.963239, "o", "\u001b[20;63H\u001b[38;5;177m█"]
[5.666817, "o", "\u001b[14;34H\u001b[38;5;233m█"]
[6.370677, "o", "\u001b[17;17H\u001b[38;5;226m█"]
[7.07389, "o", "\u001b[20;74H\u001b[38;5;169m█"]
[7.77735, "o", "\u001b[24;62H\u001b[38;5;65m█"]
[8.480983, "o", "\u001b[12;14H\u001b[38;5;208m█"]
[9.184132, "o", "\u001b[5;15H\u001b[38;5;124m█"]
[9.887653, "o", "\u001b[21;62H\u001b[38;5;176m█"]
286 changes: 284 additions & 2 deletions gallery/bouncing/bouncing.cast

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion gallery/bouncing/bouncing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ NUM_OBJECTS=5
SLEEP_TIME=0.03

_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
tput cnorm # show cursor
tput sgr0 # restore screen
exit 0
}

trap _cleanup_and_exit EXIT INT TERM QUIT # Ctrl‑C
trap _cleanup_and_exit SIGINT # Ctrl‑C

#
# Main animation loop
Expand Down
12 changes: 10 additions & 2 deletions gallery/cutesaver/cutesaver.cast
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
{"version": 2, "width": 80, "height": 20, "timestamp": 1, "env": {"SHELL": "/bin/bash", "TERM": "linux"}}
[0.6, "o", "mock output"]
{"version": 2, "width": 80, "height": 24, "timestamp": 1757617249, "env": {"SHELL": "/bin/bash", "TERM": "tmux-256color"}}
[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"]
[1.03288, "o", "ASCII to the rescue!\r\n"]
[1.536283, "o", "\r\nYou're about to get put into an infinite loop of cuteness.\r\n"]
[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"]
[4.045815, "o", "\u001b[40m"]
[4.048265, "o", "\u001b[H\u001b[J\u001b[3J"]
[4.050808, "o", "\u001b[?25l"]
[4.059175, "o", "\u001b[H\u001b[J\u001b[3J"]
[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"]
4 changes: 3 additions & 1 deletion gallery/cutesaver/cutesaver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
# Anyway, on with the cuteness. Let's load some title art.

_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
tput cnorm # show cursor
tput sgr0 # restore screen
exit 0
}
trap _cleanup_and_exit EXIT INT TERM QUIT # Catch all common exit signals
trap _cleanup_and_exit SIGINT # Catch all common exit signals

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

Expand Down
131 changes: 129 additions & 2 deletions gallery/fireworks/fireworks.cast

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion gallery/fireworks/fireworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ DELAY_DISSIPATE=0.2
DELAY_BETWEEN=0.5

_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
tput cnorm # show cursor
tput sgr0 # restore screen
exit 0
}

trap _cleanup_and_exit EXIT INT TERM QUIT # Ctrl‑C
trap _cleanup_and_exit SIGINT # Ctrl‑C

#
# Draw the full firework at once. Used for the dissipation effect.
Expand Down
39 changes: 37 additions & 2 deletions gallery/life/life.cast

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gallery/life/life.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cleanup() {
exit 0
}

trap cleanup EXIT INT TERM QUIT # Set up cleanup on exit/interrupt
trap cleanup SIGINT # Set up cleanup on exit/interrupt


init_grid() {
Expand Down
466 changes: 464 additions & 2 deletions gallery/matrix/matrix.cast

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion gallery/matrix/matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ MAX_STREAM_LEN=15
DELAY=0.04

_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
tput cnorm # show cursor
tput sgr0 # restore screen
exit 0
}

trap _cleanup_and_exit EXIT INT TERM QUIT # Catch Ctrl‑C
trap _cleanup_and_exit SIGINT # Catch Ctrl‑C

#
# Main animation loop (Optimized)
Expand Down
3 changes: 1 addition & 2 deletions gallery/pipes/pipes.cast
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{"version": 2, "width": 80, "height": 20, "timestamp": 1, "env": {"SHELL": "/bin/bash", "TERM": "linux"}}
[0.6, "o", "mock output"]
{"version": 2, "width": 80, "height": 24, "timestamp": 1757617290, "env": {"SHELL": "/bin/bash", "TERM": "tmux-256color"}}
7 changes: 5 additions & 2 deletions gallery/pipes/pipes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ parse() {


cleanup() {
tput cnorm
tput sgr0
stty echo
tput rmcup
exit 0
}

Expand Down Expand Up @@ -259,7 +263,6 @@ init_screen() {
tput civis
tput setab 0 # black background
tput clear
trap cleanup HUP TERM

resize
trap resize SIGWINCH
Expand Down Expand Up @@ -314,7 +317,7 @@ main() {
init_pipes

# any key press exits the loop and this script
trap 'break 2' INT
trap cleanup INT

local i
while REPLY=; do
Expand Down
Loading
Loading