Snow in Xterm

in #snow5 years ago (edited)


Snow for your Linux terminal, if you alter the parameters it can rain the letter N or other $pecial characters. Changing the rate at which the characters fall is also possible. One value specifies whether the character is displayed each line or more.

The xterm command to make it snow:
clear;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS));sleep 0.1;done|gawk '{a[$3]=0;for(x in a) {o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH*\033[0;0H",a[x],x;}}'

..to make it un-snow:
clear;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS));sleep 0.1;done|gawk '{a[$3]=30;for(x in a) {o=a[x];a[x]=a[x]-1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH*\033[0;0H",a[x],x;}}'

..to make it rain:
clear;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS));sleep 0.1;done|gawk '{a[$3]=0;for(x in a) {o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH.\033[0;0H",a[x],x;}}'

..to make it rain fast:
clear;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS));sleep 0.0;done|gawk '{a[$3]=0;for(x in a) {o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH.\033[0;0H",a[x],x;}}'

..to make it rain money:
clear;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS));sleep 0.1;done|gawk '{a[$3]=0;for(x in a) {o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH$\033[0;0H",a[x],x;}}'


▶️ DTube
▶️ IPFS
Sort:  

Congratulations @deanpiecka! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 700 upvotes. Your next target is to reach 800 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

You can upvote this notification to help all Steemit users. Learn why here!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64386.10
ETH 3142.17
USDT 1.00
SBD 3.98