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…
Show HN: Bash Screensavers
71–80 of 82 posts
Re: Show HN: Bash Screensavers
#72a 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
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
#73Nice! 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.
Re: Show HN: Bash Screensavers
#74Earlier 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.
Re: Show HN: Bash Screensavers
#75Do 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...
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
#76[0] https://github.com/attogram/bash-screensavers/blob/main/AGEN...
Re: Show HN: Bash Screensavers
#77I'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...
Re: Show HN: Bash Screensavers
#78How 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()
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
#79How 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.
Re: Show HN: Bash Screensavers
#80Nice! 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.