Let’s pipe in your terminal!

https://lh4.googleusercontent.com/-CKp60LHm36c/UQtlNWqfBJI/AAAAAAAAEWU/tfG_FltBlAQ/s640/pipes.sh.png

screenshot of pipes.sh.

A blog post introduced me this very interesting screensaver for terminal. Although I don’t use any kind of screensaver, not for X window or terminal, I decided to add support for multiple pipes, then I added another and another feature. Here is a screencast I recorded for showing the changes I made, much better than last time I did for Christmas terminal, though I still messed up with the recording region.

My modified code is on GitHub.

Except simplifying the code in arithmetic evaluation and adding the features I want, I didn’t actually code much. The code was good enough, though hard to read. (*Cough* I have no idea what the algorithm of the pipe drawing is.)

There is only one issue I have with this script, my cursor isn’t fully restore after the script quits. The blinking, that is. I have to reset to get terminal reset to have the blinking cursor, those term is too complicated to comprehend for me, so I have no idea how to fix it. I can use reset at the end of script, but I think the original script may restore cursor correctly, that is I am guessing my terminal setting doesn’t work perfectly.

Also, I tried to find the original author of this piece of code, the only entry I could find was posted in 2010. Still, there was no notion about who wrote the code. So, I modified the code without knowing if I had the permission. If you know who wrote this script, please give me the information.

pretty, pretty, lines, drawing. going, going, pipes, turning.