Top
Best
New

Posted by attogram 10/28/2025

Show HN: Bash Screensavers(github.com)
A github project to collect a bunch of bash-based screensavers/visualizations.
246 points | 77 commentspage 2
nickstinemates 10/28/2025|
You can also experiment and make your own[1] using TerminalTextEffects[2]. I added this to my ~/.zshrc

    > /home/keeb/code/projects/login/motd.sh
Which has..

    #!/usr/bin/env zsh

    values=("bubbles" "slide" "beams" "rain" "pour" "synthgrid" "unstable" "poop")
    len=${#values[@]}
    index=$(( (RANDOM % (len - 1)) + 1 ))
    selected=${values[$index]}

    cat /home/keeb/code/projects/login/motd | tte $selected
Change motd to have an ascii art of your choice. Run it in a loop if you want :)

1: https://keeb.dev/static/login.mp4 2: https://github.com/ChrisBuilds/terminaltexteffects

culebron21 10/28/2025||
In the good ol' days, ~1990, Norton Commander had a screensaver with stars, similar to the one in the gallery readme, but with fewer stars, that grew from a dot to bigger dot, to shining, then bursted. Nice to see something like that again.
lucideer 10/28/2025||
Nice!

First feature request: allow disabling all the `tput setab 0` calls throughout the codebase. This may make screensavers look weird on white terminals but should improve them for anyone using non-black-but-dark terminal themes.

o11c 10/28/2025|
Related: the `COLORFGBG` variable and the `tput el` sequence.
lucideer 10/29/2025||
TIL!
dorianmariecom 10/28/2025||
a simple one:

    #!/usr/bin/env bash

    _cleanup_and_exit() {
      tput cnorm
      tput sgr0
      clear
      exit 0
    }

    trap _cleanup_and_exit SIGINT

    while true; do
      width=$(tput cols)
      height=$(tput lines)

      tput setab 0
      clear
      tput civis

      x=$((RANDOM % width + 1))
      y=$((RANDOM % height + 1))
      color_code=$((RANDOM % 256))

      printf "\e[${y};${x}H\e[38;5;${color_code}m"

      sleep 1
    done
axiolite 10/28/2025|
Just an empty screen here... You're picking random positions on screen, and random colors, but then you don't display ANY text so the info is discarded and cells remain clear.

After the printf, perhaps you want: tput smso; echo -n " "

Then I find moving the second "clear" before the "while" makes it more interesting. Not sure if that's more like what you intended.

dorianmariecom 10/30/2025||
yeah hn blocks the square rectangle character
ratelimitsteve 10/28/2025||
ive always wanted to build something like this for divination, an X by Y field in which each cell is randomly assigned a character from a set which refreshes on a tick that you're meant to just gaze on and look for spontaneous patterns in, maybe with some conway game of life style rules about how cells can be more or less likely to update based on the states of their neighbors. Fork incoming.
skeptrune 10/28/2025||
I love seeing projects like this on the front page. They are so fun and can be little small tricks that improve your quality of life drastically.
rkapsoro 10/28/2025||
fwiw I've noticed that Omarchy[1] uses some terminal-based screensavers, using something called tte[2] to do so.

1: https://omarchy.org/

2: https://github.com/ChrisBuilds/terminaltexteffects

Evidlo 10/28/2025||
Why does the cursor flicker around the screen for most of these? Does it have something to do with not double buffering the display?
attogram 10/28/2025|
Some artifact from asciinema maybe. Only shows up in the preview gifs. Needs to be fixed!
panki27 10/28/2025||
For tmux users: you can use the lock-command option with something like cmatrix for a quick and dirty screensaver.
corranh 10/28/2025|
Very cool! Reminds me of the various 90s movie pretend hacker typing screensavers like Neo-HackerTyper.
seba_dos1 10/28/2025|
Check hollywood out then: https://github.com/dustinkirkland/hollywood
More comments...