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 experience
Okay, I have a working prototype of a snowplow idea, it took me a long time to wrap my head around how things were rendered to the screen and how it kept track of snow particles.
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.
I'm running ubuntu 23.10 and was pleased to see that xsnow (apt install xsnow) has been updated and "just works". A nice update on xsnow from decades back, but there's a vintage mode for the nostalgic.
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.
Time marches on, but I wonder how many new linux users will never see so many cool old programs as they just do not know about them.
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?
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.
I think only the parts of X that talk directly to the graphics hardware are being abandoned and that many of the things you mention will continue to work.
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!
How does xwayland help here? In order to see what xsnow is about look here [1]. From my understanding such a program is fundamentally against wayland design philosophy. I feed it will be just impossible with Wayland unless you implement it as part of the display server.
> From my understanding such a program is fundamentally against wayland design philosophy
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?
> 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?
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…
Under settings there is a a button in the center that says "below windows". Click it. It should put the snow in front of the windows. Notice that it will say click again to confirm.
Hmm, odd, I found that button but it is greyed out.
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.
I'm running Slackware. After updating to 15.0 i was shocked that xsnow , instead of starting, displayed a config dialogue.
I removed it and installed the older 1.42 version.
Saving that alias as I love things done in ruby, really nice. If anyone else was curious about a breakdown on some of the parts.
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.
There use to be a tiny software at the time of windows XP. It created a falling snow effect on your screen (they were just tiny white pixels as i remember) which collected on sharp edges including icons, taskbar and text and accumulate over time. It would disappear when a window was moved. Anyone remember its name?
The original concept was a screensaver for Macintosh, which was soon after ported to X Windows as "Xsnow". Several different versions were made for Windows. Here's one: https://janswaal.home.xs4all.nl/WinSnow/
Found the tool I was talking about after searching in my backup drive with old stuff. It was a small tool df_snowfall from 2006 downloaded from a now defunct warez site www.darfun.tk. Might have downloaded it along with some other software. Windows 10 kept complaining it's a trojan and didn't run it correctly even with compatibility mode.
[Because linking to cool zsh features seems to be a hobby of mine…]
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.
Interesting, a new meaning I have learned. There have been some new terms in the last few years, like gaslighting etc. In germany we don't even have translations for those, we just adopt the english wording. Let's see when "snow job" comes into our language, I haven't heard it here yet.