Top
Best
New

Posted by attogram 21 hours ago

Show HN: Bash Screensavers(github.com)
A github project to collect a bunch of bash-based screensavers/visualizations.
216 points | 74 comments
throwaway2037 18 hours ago|
How can anyone have a bad day when great projects like this pop up on the front page of HN?

Did you see the library of viz? https://github.com/attogram/bash-screensavers/blob/main/libr...

My favourite API: lov_die_with_honor()

axiolite 10 hours ago||
With "matrix" causing bash to consume 46% of my CPU time, I think I'll pass. I think I can play the actual film in 4K with less CPU time than that.
o11c 4 hours ago||
Hm, does caching the result of each unique `tput` fix that?
AdieuToLogic 7 hours ago||
> My favourite API: lov_die_with_honor()

A friend of mine fancied the following when making an infinite loop in C:

  #define MONEY 1
  #define POWER 1

  while (MONEY == POWER)
  {
    ...
  }
attogram 21 hours ago||
Gallery of current screensavers: https://github.com/attogram/bash-screensavers/blob/main/gall...
izabera 18 hours ago|
they're generally pretty but they should really hide the cursor, it looks offputting in basically all cases
attogram 17 hours ago||
Agreed! Known bug that will get squashed...
jsmailes 17 hours ago||
I like how all the tests seem to be contained within a "jury" folder which judges the merit of your code, made me smile - It's always nice for open-source/FOSS projects to retain a bit of whimsy and joy.
seba_dos1 20 hours ago||
You can put them onto your Plasma wallpaper and/or lockscreen background with plasma-wallpaper-application: https://invent.kde.org/dos/plasma-wallpaper-application

(thought I'd share that since its raison d'être was to put Asciiquarium there :))

zahlman 14 hours ago||
Nice. This makes them actual screensavers in my view as opposed to just animations. (Not that screens require "saving" any more, but still.)
messe 13 hours ago||
> Not that screens require "saving" any more, but still.

OLEDs can still suffer from burn-in, but it's also just easier to have them... turn off...

imiric 17 hours ago||
Ah, sweet!

Do you know if this supports any DE (or no DE)? Or is it strictly for KDE Plasma?

seba_dos1 17 hours ago||
Plasma wallpaper plugins are, well, for Plasma.

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.

imiric 16 hours ago||
Right, but I hoped it would work as a standalone Qt app.

Yeah, I've used xwinwrap before, but am lost on Wayland. I'll look into windowtolayer, thanks. I'd rather not have to write this myself...

PessimalDecimal 19 hours ago||
I've used Emacs for years but just recently learned about zone.el. I wonder if this is based on it too. I see some of the same screensavers here.
blenderob 19 hours ago|
Wow! The copyright of zone.el goes back to 2000. But this is the first time I hear about it! How did you find this gem?
PessimalDecimal 18 hours ago|||
It got mentioned briefly in an article in Mickey Petersen's excellent Mastering Emacs blog.
LukeShu 17 hours ago|||
I know the trendy thing is to hide the menu-bar, but it's great for discoverability. Tools→Games→Zone Out
dakinitribe 12 hours ago||
Never a nice surprise when I find rm -rf / --no-preserve-root in a public repo, apart from this time!

Also, found one of the easter eggs!

attogram 11 hours ago|
Good catch!

For folks curious about the rm -rf see https://github.com/attogram/bash-screensavers/blob/main/gall... line 339

culebron21 15 hours ago||
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.
jedberg 10 hours ago||
I've never seen a repo that invites AI coders and then tells them how to behave [0]. I imagine we'll see more of this in the future.

[0] https://github.com/attogram/bash-screensavers/blob/main/AGEN...

chrysoprace 9 hours ago|
AGENTS.md is an attempt to standardise around the different conventions each of the agents uses[0]. It's an initiative by OpenAI. Anthropic don't seem to be in a hurry to support it though[1], possibly to maintain some kind of walled garden, but that's purely speculation on my part.

[0] https://agents.md/

[1] https://github.com/anthropics/claude-code/issues/6235

nickstinemates 17 hours ago||
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

lucideer 14 hours ago|
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 hours ago|
Related: the `COLORFGBG` variable and the `tput el` sequence.
More comments...