(thought I'd share that since its raison d'être was to put Asciiquarium there :))
What are those commit messages?
https://github.com/attogram/bash-screensavers/tree/a7369a93c...
[1]: https://en.wikipedia.org/wiki/ANSI_escape_code#Control_Seque...
Did you see the library of viz? https://github.com/attogram/bash-screensavers/blob/main/libr...
My favourite API: lov_die_with_honor()
zmodload zsh/mapfile
Screensavers are a lost art. I still enjoy them, but at some point we just gave up on them. In the era of CRTs they had a practical purpose (they're screen savers, after all), but modern OLED displays also suffer from burn-in for which screensavers would be useful. My enjoyment is purely aesthetic, though. Sometimes I just want to have something pleasing to glance at in the background, instead of a black screen.
Nowadays most operating systems and desktop environments don't even support them. The state of the art on Linux still seems to be `xscreensaver`, which does have many great ones, but the collection is static, and most of it is visually stuck in the 90s. I wouldn't even try getting it to run on Wayland, and when I last looked into it, it required some hacks and 3rd-party tools.
Also, I've always found the feature of screen locking and screen saving to be orthogonal. Often I want to see pretty graphics without locking my screen, and viceversa.
> /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
When it comes to wallpapers, you could do a similar trick on X11 DEs by putting it onto the root window (with a tool like xwinwrap) and on Wayland DEs that support layer-shell (with a tool like windowtolayer). I'm not aware of screen lockers that do something like that, but you could always write your own one.
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.
A lot of screensavers, even historically, forget the original purpose of what "saving" your screen means.
Also, found one of the easter eggs!
I found the 4k fullscreen perf in iTerm2 to be not-great, so I did it again in the kitty (GPU powered) terminal macos app, and it was good.
#!/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
doneFor folks curious about the rm -rf see https://github.com/attogram/bash-screensavers/blob/main/gall... line 339
1: https://www.pcworld.com/article/2918628/your-oled-displays-w...
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.
We used to have screensavers with CRT because it took them a lot of time to power on and most early CRTs didn't have power saving capabilities so showing something wasn't significantly worse than having a black screen in term of power usage.
[0] https://github.com/attogram/bash-screensavers/blob/main/AGEN...
A friend of mine fancied the following when making an infinite loop in C:
#define MONEY 1
#define POWER 1
while (MONEY == POWER)
{
...
}