Last active
January 27, 2026 13:29
-
Star
(141)
You must be signed in to star a gist -
Fork
(23)
You must be signed in to fork a gist
-
-
Save sontek/1505483 to your computer and use it in GitHub Desktop.
Make your terminal snow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| LINES=$(tput lines) | |
| COLUMNS=$(tput cols) | |
| declare -A snowflakes | |
| declare -A lastflakes | |
| clear | |
| function move_flake() { | |
| i="$1" | |
| if [ "${snowflakes[$i]}" = "" ] || [ "${snowflakes[$i]}" = "$LINES" ]; then | |
| snowflakes[$i]=0 | |
| else | |
| if [ "${lastflakes[$i]}" != "" ]; then | |
| printf "\033[%s;%sH \033[1;1H " ${lastflakes[$i]} $i | |
| fi | |
| fi | |
| printf "\033[%s;%sH\u274$[($RANDOM%6)+3]\033[1;1H" ${snowflakes[$i]} $i | |
| lastflakes[$i]=${snowflakes[$i]} | |
| snowflakes[$i]=$((${snowflakes[$i]}+1)) | |
| } | |
| while : | |
| do | |
| i=$(($RANDOM % $COLUMNS)) | |
| move_flake $i | |
| for x in "${!lastflakes[@]}" | |
| do | |
| move_flake "$x" | |
| done | |
| sleep 0.1 | |
| done |
That’s a fun idea it instantly reminds me of a snow day predictor in a playful way. Turning your terminal into a snowy scene makes you feel like a snow day is coming, even if it’s just visual. It’s a cool mix of tech and seasonal vibes that keeps things light, almost like seeing cheerful snow day quotes that put you in the right mood before heading outside. Sometimes little touches like that make coding way more enjoyable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


This is what I get on MacOS iTerm2. Is this supposed to be it! I was expecting SNOW flakes xD.