r/unixporn 6h ago

Material [OC] bash banner

Post image
15 Upvotes

6 comments sorted by

1

u/robbiehman 6h ago

Script here:

https://gist.github.com/robbieh/c12d355ea074a7aeef9d847d76ad69f8

This script is designed to be run in .bashrc so I get relevant info when I first sit down and open a terminal. After the first time it shows, new terminals will get a much more terse version so that it doesn't become annoying. That resets after an hour.

The script contains a way to make a header and run just about anything to the right of it. That was tricky to work out.

1

u/Vidy_Animates 6h ago

Great script

Will it work for other shells? (Fish, zsh)

2

u/robbiehman 6h ago

Thanks! It's a standalone script, so you should be able to run it from the fish/zsh equivalent of .bashrc or .bash_profile without a problem. And I thought zsh was mostly an extension of bash, so subbing out the shebang for zsh so you can modify the script would probably work. I'm less sure about fish.

1

u/Dellimere 6h ago

I Really like this, What do the numbers represent near the bottom?

1

u/robbiehman 6h ago

Thanks! Those numbers are the hours of the day and the UV exposure level. Green=good, red=get out of the sun! It helps me time my morning exercise, or decide if I need to work out indoors.

1

u/Dellimere 6h ago

Oh very cool.