Live data from Hacker News

Show HN: Bash Screensavers

github.com

61–70 of 82 posts

Re: Show HN: Bash Screensavers

#62

Earlier quoted context omitted.

Even after updating still getting the same error checked active bash version: echo $BASH_VERSION 5.3.3(1)-release

What's relevant is whether "/usr/bin/env bash" runs the correct one.

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.

Re: Show HN: Bash Screensavers

#63
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

Re: Show HN: Bash Screensavers

#66
post #55

Earlier quoted context omitted.

IIRC macOS is at least one major version behind in bash.

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

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.

Re: Show HN: Bash Screensavers

#67
post #66

Earlier quoted context omitted.

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

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 old and set in my ways to care to learn a new shell. Choosing a shell, IDE, font, etc are games for youth.

Re: Show HN: Bash Screensavers

#68

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.
Post reply on HN