I'm doing my thesis with Node-red on Raspberry Pi. The Raspberry Pi will run only node-red, so I thought of spicing things up a bit for the Raspberry Pi terminal.
I'm already piping the Node-red output through lolcat, but I still feel like it could use something more... Something like a cow saying all those logs.
So the problem is that cowsay outputs only on the program exit. If I read one line in bash script and push it to cowsay, like in another question here, there's a new cow for every logging message. This would clutter the terminal with a horde of cows, which I like the sound of, but isn't really practical.
I feel like I'm pushing the limits of this being easier to do from scratch instead of using cowsay, but I'll ask anyway: How do I have a single cow from cowsay saying the log messages, having the logs scroll upwards in the speech bubble without the cow moving?
The whole idea of a terminal is to print output line by line. So having a fixed bottom part and a change in previous lines goes against this.
However you could simulate this with a terminal multiplexer (e.g.
tmux
orscreen
). They create split screen terminals. This way you can have e.g. the bottom 10% of the screen be one terminal where the cow is printed and left untouched. In the top 90% the actual action is happening and the lines scroll as expected.Take a look at terminal multiplexers here.