Skip to content
Open
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
5 changes: 4 additions & 1 deletion gallery/alpha/alpha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ trap _cleanup_and_exit SIGINT # Ctrl‑C
width=$(tput cols)
height=$(tput lines)

tput setab 0 # black background

if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # no cursor

Expand Down
5 changes: 4 additions & 1 deletion gallery/bouncing/bouncing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ trap _cleanup_and_exit SIGINT # Ctrl‑C
# Main animation loop
#
animate() {
tput setab 0 # black background

if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand Down
4 changes: 3 additions & 1 deletion gallery/cutesaver/cutesaver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ sleep 2

# Now we'll simply start the animation.
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand Down
4 changes: 3 additions & 1 deletion gallery/fireworks/fireworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ draw_firework() {
# Main animation loop
#
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand Down
4 changes: 3 additions & 1 deletion gallery/matrix/matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ trap _cleanup_and_exit SIGINT # Catch Ctrl‑C
# Main animation loop (Optimized)
#
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand Down
4 changes: 3 additions & 1 deletion gallery/pipes/pipes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ init_screen() {
stty -echo
tput smcup
tput civis
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
tput clear

resize
Expand Down
4 changes: 3 additions & 1 deletion gallery/rain/rain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ trap _cleanup_and_exit SIGINT # Ctrl‑C
# Main animation loop (Optimized)
#
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand Down
4 changes: 3 additions & 1 deletion gallery/speaky/speaky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ trap cleanup_and_exit SIGINT
the_show_must_go_on() {
lov_detect_engine
lov_hide_cursor
lov_back_color 0 # Set background to black
if [[ ! transparent_background -eq 1 ]]; then
lov_back_color 0 # Set background to black
fi
lov_clear_screen

if [ -z "$LOV_TTS_ENGINE" ]; then
Expand Down
10 changes: 6 additions & 4 deletions gallery/stars/stars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ DELAY=0.02
STARS=("*" "." "+" "'" "O")

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

trap _cleanup_and_exit SIGINT # Ctrl‑C
Expand All @@ -28,7 +28,9 @@ trap _cleanup_and_exit SIGINT # Ctrl‑C
# Main animation loop
#
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand Down
40 changes: 20 additions & 20 deletions gallery/tunnel/tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ COLORS=($'\e[31m' $'\e[32m' $'\e[33m' $'\e[34m' $'\e[35m' $'\e[36m')
DELAY=0.02

_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
tput cnorm # show the cursor again
tput sgr0
echo
exit 0
tput cnorm # show the cursor again
tput sgr0
echo
exit 0
}

trap _cleanup_and_exit SIGINT # Ctrl‑C
Expand All @@ -22,7 +22,9 @@ trap _cleanup_and_exit SIGINT # Ctrl‑C
# Main animation loop
#
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand All @@ -47,24 +49,23 @@ animate() {
local is_moving=0 # Start in a paused state
local next_state_change_time
next_state_change_time=$(date +%s)
local move_duration=10 # seconds
local min_pause_duration=5 # seconds
local move_duration=10 # seconds
local min_pause_duration=5 # seconds
local max_pause_duration=20 # seconds
local angle_increment=0.005 # Slow down the movement


# Plot a point, checking for screen boundaries
plot_point() {
local x=$1 y=$2 char=$3 color=$4
if (( x >= 0 && x < width && y >= 0 && y < height )); then
if ((x >= 0 && x < width && y >= 0 && y < height)); then
frame_buffer+="\e[$((y + 1));$((x + 1))H${color}${char}"
fi
}

# Erase a point, checking for screen boundaries
erase_point() {
local x=$1 y=$2
if (( x >= 0 && x < width && y >= 0 && y < height )); then
if ((x >= 0 && x < width && y >= 0 && y < height)); then
frame_buffer+="\e[$((y + 1));$((x + 1))H "
fi
}
Expand All @@ -73,8 +74,8 @@ animate() {
# --- State management for movement ---
local current_time
current_time=$(date +%s)
if (( current_time >= next_state_change_time )); then
if (( is_moving )); then
if ((current_time >= next_state_change_time)); then
if ((is_moving)); then
# Transition to paused state
is_moving=0
local pause_duration=$((RANDOM % (max_pause_duration - min_pause_duration + 1) + min_pause_duration))
Expand All @@ -87,7 +88,7 @@ animate() {
fi

# --- Update center coordinates only when moving ---
if (( is_moving )); then
if ((is_moving)); then
# When moving, the center of the tunnel is continuously recalculated
# to create the illusion of flying through a turning tunnel.
read -r angle center_x center_y < <(awk -v angle="$angle" \
Expand All @@ -102,22 +103,21 @@ animate() {
}')
fi


frame_buffer=""
# Add a new ribbon every few frames
if (( frame_counter % ribbon_spacing == 0 )); then
if ((frame_counter % ribbon_spacing == 0)); then
radii+=("1 $center_x $center_y")
fi

local -a next_radii=()
for ridge_data in "${radii[@]}"; do
local r cx cy
read -r r cx cy <<< "$ridge_data"
read -r r cx cy <<<"$ridge_data"

if [ $r -gt 0 ]; then
local prev_r=$((r-1))
local prev_r=$((r - 1))
# Erase the previous shape
for ((i=0; i < prev_r; i++)); do
for ((i = 0; i < prev_r; i++)); do
erase_point $((cx + i)) $((cy - prev_r + i))
erase_point $((cx + prev_r - i)) $((cy + i))
erase_point $((cx - i)) $((cy + prev_r - i))
Expand All @@ -128,7 +128,7 @@ animate() {
local color=${COLORS[$((r % ${#COLORS[@]}))]}
local char=${CHARS[$((r % ${#CHARS[@]}))]}
# Draw a square/diamond shape
for ((i=0; i < r; i++)); do
for ((i = 0; i < r; i++)); do
plot_point $((cx + i)) $((cy - r + i)) "$char" "$color"
plot_point $((cx + r - i)) $((cy + i)) "$char" "$color"
plot_point $((cx - i)) $((cy + r - i)) "$char" "$color"
Expand All @@ -137,7 +137,7 @@ animate() {

# Increment radius for the next frame, and keep it if it's not too large
local next_r=$((r + 1))
if (( next_r < max_radius )); then
if ((next_r < max_radius)); then
next_radii+=("$next_r $cx $cy")
fi
done
Expand Down
52 changes: 26 additions & 26 deletions gallery/vibe/vibe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
# --- Configuration ---
# Color palette for the "dark -> bright -> dark" cycle.
PALETTE=(
$'\e[38;5;22m' # Dark Green
$'\e[38;5;22m' # Dark Green
$'\e[38;5;28m'
$'\e[38;5;34m'
$'\e[38;5;40m'
$'\e[38;5;46m' # Bright Green
$'\e[38;5;46m' # Bright Green
$'\e[38;5;82m'
$'\e[38;5;118m'
$'\e[38;5;45m' # Bright Blue
$'\e[38;5;45m' # Bright Blue
$'\e[38;5;39m'
$'\e[38;5;33m'
$'\e[38;5;27m'
$'\e[38;5;21m' # Dark Blue
$'\e[38;5;52m' # Dark Purple
$'\e[38;5;21m' # Dark Blue
$'\e[38;5;52m' # Dark Purple
$'\e[38;5;93m'
$'\e[38;5;129m'
$'\e[38;5;165m' # Bright Purple
$'\e[38;5;165m' # Bright Purple
)
RESET=$'\e[0m'

Expand All @@ -49,35 +49,34 @@ CONTENT=(
)

GLITCHES=(
"
"
_ _
( \/ )
\ /
)(
(__)
"
"
"
____
(____)
(____)
(____)
"
"SYNTAX ERROR"
"DECOMPILING..."
"SYNTAX ERROR"
"DECOMPILING..."
)


# The maximum length of the character streams
MAX_STREAM_LEN=20
# Animation speed (lower is faster)
DELAY=0.04

_cleanup_and_exit() { # handler for SIGINT (Ctrl‑C)
tput cnorm # show the cursor again
tput sgr0 # reset all attributes
clear
echo
exit 0
tput cnorm # show the cursor again
tput sgr0 # reset all attributes
clear
echo
exit 0
}

trap _cleanup_and_exit SIGINT # Catch Ctrl‑C
Expand All @@ -86,7 +85,9 @@ trap _cleanup_and_exit SIGINT # Catch Ctrl‑C
# Main animation loop (Optimized)
#
animate() {
tput setab 0 # black background
if [[ ! transparent_background -eq 1 ]]; then
tput setab 0 # black background
fi
clear
tput civis # Hide cursor

Expand All @@ -97,12 +98,12 @@ animate() {
height=$(tput lines)

# Initialize column arrays
local -a heads # y-position of the head of the stream
local -a stream_lengths # length of the stream
local -a active_cols # 1 if column is active, 0 if not
local -a heads # y-position of the head of the stream
local -a stream_lengths # length of the stream
local -a active_cols # 1 if column is active, 0 if not
local -a stream_content

for ((i=0; i<width; i++)); do
for ((i = 0; i < width; i++)); do
active_cols[$i]=0
done

Expand All @@ -119,8 +120,7 @@ animate() {
frame_buffer+="\e[${glitch_y};${glitch_x}H\e[38;5;231m\e[48;5;52m${glitch_content}${RESET}"
fi


for ((i=0; i<width; i++)); do
for ((i = 0; i < width; i++)); do
# If a column is inactive, randomly decide to activate it
if [ ${active_cols[$i]} -eq 0 ]; then
if [ $((RANDOM % 100)) -lt 5 ]; then
Expand All @@ -138,13 +138,13 @@ animate() {
local content_len=${#content}

# --- Draw the full stream with the color cycle gradient ---
for ((j=0; j < stream_len; j++)); do
for ((j = 0; j < stream_len; j++)); do
local y=$((y_head - j))
if [ $y -lt 1 ]; then break; fi

local color_index=$((j % ${#PALETTE[@]}))
local color=${PALETTE[$color_index]}
local char_index=$(( (y_head - y) % content_len ))
local char_index=$(((y_head - y) % content_len))
local char=${content:$char_index:1}
frame_buffer+="\e[${y};$((i + 1))H${color}${char}"
done
Expand All @@ -169,7 +169,7 @@ animate() {

# Vary the speed slightly
local random_delay
random_delay=$(printf "0.0%d" $((RANDOM % 3 + 2)) )
random_delay=$(printf "0.0%d" $((RANDOM % 3 + 2)))
sleep $random_delay
done
}
Expand Down
Loading