Or white noise, no signal, signal lost, or whatever you call it. It’s a screen you see when nothing on television.
I was looking for one as screensaver in terminal about a week ago, but really couldn’t find any. Here is a small piece of Bash that kind of doing it in one-liner:
while sleep .1; echo -ne '\e[2J'; do for ((y = 1; y <= LINES; y++)); do for ((x = 1; x <= COLUMNS; x++)); do ((RANDOM > 30000)) && echo -ne "\e[$y;${x}H\e[1;37m.\e[0m"; done; done; done
Break down version:
while sleep .1; echo -ne '\e[2J'; do for ((y = 1; y <= LINES; y++)); do for ((x = 1; x <= COLUMNS; x++)); do ((RANDOM > 30000)) && \ echo -ne "\e[$y;${x}H\e[1;37m.\e[0m" done done done
Change 30000 to something else for the white dots probability.
This Bash implementation is slow, I think a C would be much better, but I just didn’t want to continue, so I blog this idea. If you know a program does just this, or you want to see this happening, or team up, shoot me a message.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.