Top
Best
New

Posted by attogram 1 day ago

Show HN: Bash Screensavers(github.com)
A github project to collect a bunch of bash-based screensavers/visualizations.
216 points | 74 commentspage 2
huhtenberg 23 hours ago|
For the 'life' screensaver it might make sense to use half blocks as a base rendering unit. ASCII 220 and 223.
rkapsoro 17 hours ago||
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

skeptrune 20 hours ago||
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.
LocoPadre 22 hours ago||
Recommendation: Use the terminal control codes 1049h and 1049l [1][2] to keep the terminal 'clean'.

[1]: https://en.wikipedia.org/wiki/ANSI_escape_code#Control_Seque...

[2]: https://unix.stackexchange.com/a/789031

LeoPanthera 16 hours ago||
Of course, if used as an actual screensaver on a phosphor or plasma based screen, eventually the character grid would be burned into your screen.

A lot of screensavers, even historically, forget the original purpose of what "saving" your screen means.

dorianmariecom 15 hours ago||
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 13 hours ago|
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.

Evidlo 23 hours ago||
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 23 hours ago|
Some artifact from asciinema maybe. Only shows up in the preview gifs. Needs to be fixed!
corranh 20 hours ago||
Very cool! Reminds me of the various 90s movie pretend hacker typing screensavers like Neo-HackerTyper.
seba_dos1 20 hours ago|
Check hollywood out then: https://github.com/dustinkirkland/hollywood
Agingcoder 15 hours ago|
Why bother with Xwindow when you can have this ?
More comments...