8 ms·
Let it snow in your terminal
- tambourine_man 3y agoScreen captures?
- andrelaszlo 3y agohttps://github.com/sontek/snowmachine#snowmachine https://github.com/sontek/snowmachine#snowmachine There are some asciinema recording links in the Github readme.
- tambourine_man 3y agoAwesome, thanks
- sliken 3y agoI'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.
- readingnews 3y agoTime 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? 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-special-programs-do-some-of-these-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 https://www.ucw.cz/~hubicka/koules/English/koules.html
- globular-toast 3y agoThere is xwayland, yes.
- funcDropShadow 3y agoHow 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. [1]: https://www.youtube.com/watch?v=T2Mzg2i6t0I https://www.youtube.com/watch?v=T2Mzg2i6t0I
- Someone 3y ago> 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?
- funcDropShadow 3y ago> 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?
- jmclnx 3y agoYes, I remember koules, played that a lot. 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_slackware_142/ 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.
- wkat4242 3y agoI always loved xfishtank. I still have a strong preference for animated root windows today.
- bee_rider 3y agoWhat a cute program. 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…
- sliken 3y agoUnder 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.
- bee_rider 3y agoHmm, 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.
- fl7305 3y agoxsnow even works well under Windows WSL. The whole screen was full with snowflakes, birds, etc. Impressive that the X11 XShape (Nonrectangular Window Shape Extension) works so well.
- hulitu 3y agoI'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.
- lynx23 3y agosnowjob, haha. Reminds me of the notorious pronview flamewar on debian-devel. Nice to see that language police hasn't fully overtaken FLOSS yet.
- galangalalgol 3y agohttps://dictionary.cambridge.org/us/dictionary/english/snow-job https://dictionary.cambridge.org/us/dictionary/english/snow-...
- WarOnPrivacy 3y agoYoung people today.
- brettermeier 3y agoInteresting, 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.
- stabbles 3y agoIt's impressive that this can be done in a few lines of bash: https://gist.github.com/sontek/1505483 https://gist.github.com/sontek/1505483
- WarOnPrivacy 3y agoScript runs in my WSL/Ubuntu but it seems u274$[($RANDOM%6)+3] wasn't understood properly. I got question boxes. The Slow Rain of Unknowns works for me tho.
- ensocode 3y agocould you try 0x274?
- mminer237 3y agoSounds like an issue with Windows Console Host, not WSL itself as it works for me in WSL in WezTerm.
- vidarh 3y agoYour font is missing the relevant glyphs from u2743 onwards. See[1] for what they're meant to look like. [1] https://www.compart.com/en/unicode/block/U+2700 https://www.compart.com/en/unicode/block/U+2700
- schiffern 3y ago> You can pass –stack if you want the snow to pile up The flag is --stack of course (I checked), but somewhere a helpful formatting engine replaced two hyphens with an en dash.
- tux3 3y agoYour experience has been Improved by a smart feature. Pray they don't improve it further!
- chewz 3y ago> ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}'
- ensocode 3y agoawesome!
- SnowingXIV 3y agoSaving 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.
- dustinsterk 3y agoThis is amazing.
- deleted 3y ago
- JKCalhoun 3y agoHilariously old-school. Even the name, snowjob, feels wonderfully anachronistic in 2023. Definitely getting TRS-80, Robert Frost (1) vibes from this one. (1) https://youtu.be/j-Zcog5o_p0?t=10 https://youtu.be/j-Zcog5o_p0?t=10
- andy99 3y agocat /dev/random | tr -c 'ox0.@' ' ' (poor man's version)
- mi_lk 3y agooh I love this!
- marginalia_nu 3y ago$ cat /dev/random | tee >(aplay -r 8000) | tr -c 'ox0.@' ' ' If you really want to conjure a howling blizzard (R.I.P headphone users though)
- austinjp 3y agoNice. Here's a version with snow falling down instead of up. 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
- smusamashah 3y agoThere 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?
- technothrasher 3y agoThe 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/ https://janswaal.home.xs4all.nl/WinSnow/
- smusamashah 3y agoFound 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.
- WarOnPrivacy 3y agoGoing to try this in my pfsense console because I am a bad admin.
- forward1 3y agoPython? We don't need no stinkin' Python. while sleep 0.1; do printf "%-$(( ( RANDOM % `tput cols` ) - 1))s\e[0;$(( 30 + ($RANDOM % 8) ))m*\n" ; done
- ensocode 3y agoNice - if you can do a handstand :)
- JoBrad 3y agoImpressive, but mine was also floating up vs down. :)
- folmar 3y agoby bash wants more ()s while sleep 0.1; do printf "%-$(( ( RANDOM % $(tput cols) ) - 1))s\e[0;$(( 30 + ($RANDOM % 8) ))m\*\n" ; done
- swingingFlyFish 3y agohahhah I just tried this. I'm impressed!
- tetris11 3y agoShout out to Alphapapa's excellent snow.el script for Emacs https://github.com/alphapapa/snow.el https://github.com/alphapapa/snow.el
- sontek 3y agoWow, surprising to see this on the frontpage this morning! This is my old script, the better one to use is called snowmachine: * 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 experience
- dfee 3y agoI thought your handle sounded familiar. You used to hang out in the pyramid irc channel. Thanks for your help those many years ago.
- sontek 3y agoPyramid is still the best web framework
- shusaku 3y agoHopefully this post inspires someone to take on the snow plow character feature request
- beardedmoose 3y agoI feel inspired to take it on. I have questions on how they pictured it because it could be implemented in quite a few ways.
- beardedmoose 3y agoI've forked it and made changes as well as submitted a pull request to Sontek. https://github.com/batfasturd/snowmachine https://github.com/batfasturd/snowmachine
- beardedmoose 3y agoOkay, 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.
- treypitt 3y agoThis is awesome...cmatrix is a similar program I like based on The Matrix, available on homebrew
- kiriberty 3y agoDidn't work in zsh on my Mac. Fixed the issues and added a couple of effects: https://github.com/lasanthak/snowjob/blob/main/snowjob.sh https://github.com/lasanthak/snowjob/blob/main/snowjob.sh
- JNRowe 3y ago[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. ¹ https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-zsh_002fterminfo-Module 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-zsh_002fzselect-Module https://zsh.sourceforge.io/Doc/Release/Zsh-Modules.html#The-...
- jeanlucas 3y agoMe in Brazil letting it snow on my terminal while it's currently 100°F
- eatbitseveryday 3y agoSnowing on https://mullvad.net/ https://mullvad.net/
- agys 3y agoAn unrelated version of snow on the ASCII playground (runs in the browser, interactive): https://play.ertdfgcvb.xyz/#/1640473937099 https://play.ertdfgcvb.xyz/#/1640473937099
- nineteen999 3y agoYou can have a roaring fire in another tty: https://github.com/dmo9000/ttyfire https://github.com/dmo9000/ttyfire