Let it snow in your terminal
github.com
github.com
* https://github.com/sontek/snowmachine
* https://pypi.org/project/snowmachine/
Which is also on docker, homebrew, nix, etc. It probably makes sense to update the post to link to one of these since they'll provide a better experienceThanks for your help those many years ago.
Now I am going to work on a few bugs and clean up the code so I can either fork it or submit a pull request.
The new xsnow added stars, aurora, birds, moon, stars, wind, blowing snow, moose, meteors, reindeer, snow that builds up slowly (the flakes compress) etc. Sadly snow builds up on the settings window, but with weyland it doesn't build up on normal windows.
Does that thing everyone keeps trying to get us all to move to (I am a hardcore ICEwm / *boxwm user) support all of the old X stuff like xsnow, xscreensaver, etc?
I was sad to realize that xroach is no longer in Debian (or Gentoo, there is a bug report from 2009), however, others still exist: https://unix.stackexchange.com/questions/204241/x-windows-sp...
As SE says, do not forget the "santa" option to xsnow. I forgot about it.
This always reminds me, anyone remember Koules? https://www.ucw.cz/~hubicka/koules/English/koules.html
Against the philosophy but, I think, not completely impossible. Wayland is “just a protocol”, so somebody could write a Wayland server that runs in a Wayland window. Then, you could draw anywhere in the outer window, including outside of the inner one(s).
Make the outer window not have a title bar, etc. and run in full screen, and you’re done.
Isn’t that what XWayland does, except for the fact that it runs X Windows windows inside a full screen Wayland window?
I don't know. But if it does so, how does it integrate wayland windows with X windows? How does it stop X programs from observing the window contents of wayland programs?
That is the saddest thing about Wayland, a lot of cool little X applications will stop working and be forgotten about.
There is xfishtank, I posted this screen to remind people about it years ago. I kick that off every so often for fun.
https://old.reddit.com/r/unixporn/comments/m9gk2l/ctwm_on_sl...
There are many many more of these little clients that will disappear once Linux disables X. Never mind other cool things, a couple I remember: lavaclock, bubblefishymon, catclock, xplanet.
You can do this to get a matrix wallpaper, this will work with many xscreensaver "utilities"
/usr/libexec/xscreensaver/xmatrix --root
where this is on your distro may be different.
Why can't we bring the apps you mention to wayland as a background?
For the foreground, the compositor could even use the alpha channel to draw see through snowflakes: I have foot in quaketerm mode showing what's behind. Replace foot by a smaller snowflake, make more than one of them, and it should be the same!
Or am I missing something?
It doesn’t work very well in i3, sadly. I’m not sure what I expected it to do in a tiling window manager, but it only produces snow on empty workspaces, I guess because otherwise the screen is fully occupied (no room for snowflakes). Also the menu seems to follow me around.
Still neat, though. Maybe I’ll try out a non-tiling WM for the holidays…
Thanks for the suggestion though. If I want to see snowflakes I’ll can switch to another workspace or look out the window and wait a few days. :)
Edit: When I turn on a compositor, picom, the option becomes clickable. But when I turn on picom, the flakes stop rendering for some reason. It looks like somebody came up with a patched version for i3 + picom, so I guess this is a problem that people have worked on already.
Impressive that the X11 XShape (Nonrectangular Window Shape Extension) works so well.
while sleep 0.1; do printf "%-$(( ( RANDOM % `tput cols` ) - 1))s\e[0;$(( 30 + ($RANDOM % 8) ))m*\n" ; done while sleep 0.1; do printf "%-$(( ( RANDOM % $(tput cols) ) - 1))s\e[0;$(( 30 + ($RANDOM % 8) ))m\*\n" ; doneThe flag is --stack of course (I checked), but somewhere a helpful formatting engine replaced two hyphens with an en dash.
Definitely getting TRS-80, Robert Frost (1) vibes from this one.
cat /dev/random | tr -c 'ox0.@' ' '
(poor man's version)If you really want to conjure a howling blizzard (R.I.P headphone users though)
clear ; while true ; do tput cup 0 0 ; tput ri ; head -n 1 /dev/random | cut -c "1-$COLUMNS" | tr -c '.,x*oO@'$'\n' ' ' ; done
ruby -e:
This command tells the system to execute the following Ruby code.
C=`stty size`.scan(/\d+/)[1].to_i This part gets the size of the terminal window. stty size returns the dimensions of the terminal (rows and columns) .scan(/\d+/) extracts the numbers from this output, and[1] gets the second number, which represents the number of columns and then to_i converts this number to an integer. The result is stored in the variable C.
S=["2743".to_i(16)].pack("U*") This line creates the snowflake character. "2743".to_i(16) converts the hexadecimal number 2743 (which represents the Unicode code point for a snowflake) into an integer, and .pack("U*") converts this integer into a UTF-8 character.
a={} Initializes an empty hash a. This hash will keep track of the position of each snowflake.
puts "\033[2J" This ANSI escape code clears the terminal screen.
loop{...} An infinite loop to keep the animation going.
Inside the loop.
a[rand(C)]=0 Randomly places a new snowflake in the top row at a random column.
a.each{|x,o|;...} Iterates over each snowflake.
Inside the iteration.
a[x]+=1 Moves the snowflake down one row. print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H" This part uses ANSI escape codes to move the cursor and draw the snowflakes. It moves the cursor to the old position of the snowflake, prints a space (to erase the old snowflake), then moves to the new position and prints the snowflake character. $stdout.flush Flushes the standard output buffer, ensuring that all output is displayed immediately. sleep 0.1 Pauses the loop for a short time (0.1 seconds) to control the speed of the animation.
u274$[($RANDOM%6)+3]
wasn't understood properly. I got question boxes. The Slow Rain of Unknowns works for me tho.If you're using zsh for this you can access terminfo directly¹, instead of hardcoding escapes(for example, "echoti cup $snowflakes[$i] $i"²) or shelling out to tput. You can also use zselect to replace sleep. Extra points for "echoti smcup" to use the secondary screen when available, instead of wiping the screen.
¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...
² To be fair it would need a minor change to array structure, as cup is zero-indexed.
³ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...
There are some asciinema recording links in the Github readme.