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.
218 points | 74 commentspage 3
hk1337 1 day ago|
This reminds me of having a screensaver in DOS.
adzm 1 day ago||
I thought the same thing. I remember being in elementary school and seeing one of these terminate-and-stay-resident / TSR joke things that made the smiley face ascii character bounce around the screen. That led me to finally move on from Pascal and dive into C to make one of my own, though I'm pretty sure it would be possible in Pascal, all the (very obscure) information I could find as a child used C examples. When I finally had one running that would "Moo!" at random places I felt like a real hacker.
alka47 1 day ago||
[dead]
panki27 1 day ago||
For tmux users: you can use the lock-command option with something like cmatrix for a quick and dirty screensaver.
FergusArgyll 1 day ago||
Cool

What are those commit messages?

warp 1 day ago||
Looks like an attempt to make the main GitHub page (the part above the README) display something interesting. It is messed up now because of further commits, but you can see what it looked like at the time here:

https://github.com/attogram/bash-screensavers/tree/a7369a93c...

attogram 1 day ago|||
See the spread-the-word script in https://github.com/attogram/bash-screensavers/tree/main/spot... This script generates a series of shell commands to create a "spotlight" message on the main GitHub repository page. It does this by generating commands that make trivial changes to the top 12 files and directories and then commit those changes with custom messages.
seba_dos1 1 day ago|||
Protip for the author: --allow-empty ;P
kevincox 1 day ago|||
But that doesn't change the files, so it won't show up in the tree view as the user is trying to accomplish.
xxs 1 day ago|||
instead of --amend?
seba_dos1 1 day ago||
Instead of adding or removing a space in random files when making cute and useless commit logs.
xxs 1 day ago||
that's what I meant - "amend" would not create any extra commits/entries
seba_dos1 1 day ago||
...which is not a helpful advice when what they clearly wanted is to create a bunch of extra commits.
madsohm 1 day ago||
AI slop - or worse, somebody trying to hide something.
_def 1 day ago||
unfortunately quite inefficient, I'm sure higher framerates must be possible

(at least when running in docker, maybe that's the bottleneck, but I hesitated to run this on my machine directly)

prmoustache 1 day ago||
Do screens still need to be saved?
blacksmith_tb 1 day ago|
OLEDs are famous for burning in[1], so potentially "yes".

1: https://www.pcworld.com/article/2918628/your-oled-displays-w...

prmoustache 1 day ago||
Don't tell me they burn when showing nothing or going to sleep?

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.

alejoar 1 day ago||
Doesn't work for me on MacOS:

I get "mapfile: command not found"

doodpants 1 day ago||
After installing bash via MacPorts, it works for me. All except #3 cutesaver, which gives an infinite loop of:

  cutesaver.sh: line 55: shuf: command not found
seba_dos1 1 day ago||
shuf has been a part of coreutils since 2006.
30minAdayHN 1 day ago|||
I encountered this in another project. This should hopefully fix it:

zmodload zsh/mapfile

hinkley 1 day ago|||
IIRC macOS is at least one major version behind in bash.
dylan604 1 day ago||
something something licensing something something

new installs default to bash not being the default terminal. someone else mentioned macports, but there's a new version available via brew as well

hinkley 1 day ago||
So far I have resisted the change. All the people I know who think zsh is great have a fairly large number of addons to get it that way.
dylan604 1 day ago||
This first time I used a mac where zsh was the default, I was confused for quite a bit of time when it would not run something I was used to doing. I kept looking up errors on the internet until I came across someone's post with a reply asking if they were using Terminal on a new OS X. Sure enough, this was a new mac as well. Now I know one of the first steps for me with a new Mac is change default shell. I'm way too old and set in my ways to care to learn a new shell. Choosing a shell, IDE, font, etc are games for youth.
hinkley 1 day ago||
I learned to consistently use shebangs at the top of scripts while working with the first zsh user I knew. Or might have been fish. No i think he started in zsh and moved to fish. Every time I forgot, his environment was busted. And he sat a cubicle and a half away from me, so I got fast feedback.
dylan604 1 day ago||
Just last week I found myself trying to explain shebang to someone that knows nothing of coding, command line interfaces, or what shells are. At one point, I was wondering where it was I should have stopped talking, but it was definitely well before I finished.
SeeManDo 1 day ago||
Same here
SeeManDo 1 day ago||
Bash Screensavers v0.0.27 (Mystic Shine)

./screensaver.sh: line 79: mapfile: command not found 1 .

(Press ^C to exit)

Choose your screensaver: 1 404 Screensaver Not Found:

Oh no! Screensaver had trouble! Error code: 1

seba_dos1 1 day ago|||
Get a Bash that's not ancient. mapfile is there since version 4.0 from 2009.
SeeManDo 1 day ago|||
Seems to be a old version of bash installed and used by default on macos
SeeManDo 1 day ago||
Even after updating still getting the same error

checked active bash version:

echo $BASH_VERSION

5.3.3(1)-release

seba_dos1 1 day ago||
What's relevant is whether "/usr/bin/env bash" runs the correct one.
kridsdale3 1 day ago||
I used "brew install bash && brew info bash" to get the path, then ran that shell (zsh doesn't work), then inside that new bash, ran the screensaver app.

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.

imiric 1 day ago||
Nice! I won't use this since screensavers are much more interesting when not limited to characters, but this is a neat project.

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.

ratelimitsteve 1 day ago|
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.