Live data from Hacker News

Show HN: Bash Screensavers

github.com

71–80 of 82 posts

Re: Show HN: Bash Screensavers

#71
post #66

Earlier quoted context omitted.

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.

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…

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.

Re: Show HN: Bash Screensavers

#72

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

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.

Re: Show HN: Bash Screensavers

#73

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.

Related: the `COLORFGBG` variable and the `tput el` sequence.

Re: Show HN: Bash Screensavers

#74
post #71

Earlier quoted context omitted.

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…

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.

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.

Re: Show HN: Bash Screensavers

#75

Do screens still need to be saved?

OLEDs are famous for burning in[1], so potentially "yes". 1: https://www.pcworld.com/article/2918628/your-oled-displays-w...

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.

Re: Show HN: Bash Screensavers

#77
post #76

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...

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

Re: Show HN: Bash Screensavers

#78

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()

> 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)
  {
    ...
  }

Re: Show HN: Bash Screensavers

#79

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()

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.

Hm, does caching the result of each unique `tput` fix that?

Re: Show HN: Bash Screensavers

#80
post #73

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.

Related: the `COLORFGBG` variable and the `tput el` sequence.

TIL!
Post reply on HN