Show HN: Screensavers for your terminal (Bevy/Ratatui)
github.com
github.com
tmux has `lock-command` / `lock-after-time`.
You could implement a screensaver on top of those... they only "lock" as much the $LOCKPRG / lock-command chooses to lock them, no reason a single keypress can't "unlock" the screen if it's just a screensaver.
Those will be invoked regardless of whether a program is running or it's sitting at the prompt. Since tmux and screen are terminal emulators, the underlying shell and programs running in them won't even be aware of the screen saver.
I have my friend's garage NAS set to use `cmatrix` as a lockscreen on the system console and mine uses `glances`.
Tiny glade[1], the first commercial success of a Bevy game, use Bevy but with their own renderer (IIRC they also replace other parts of Bevy but I don't remember which).
> And when it comes to the engine and the tech, Anastasia started with Bevy because it was the easiest thing to jump into, and we're still using a modified version of Bevy to this day. Technically, at the base level we have the framework called the ECS, or Entity Component System, which is the way to define the game objects and how they work, basically the lifeblood of everything happening within the game. Initially, Anastasia's prototype was using Bevy for everything, including rendering, but eventually, our needs outscaled what Bevy could provide at the time, as the need for the project was to have prettier graphics and better procedural generation on the GPU.
https://80.lv/articles/exclusive-tiny-glade-developers-discu...
A while back there was a whole post about making it snow in your terminal [1]. I think my favorite was [2]:
while sleep 0.1; do printf "%-$(( ( RANDOM % `tput cols` ) - 1))s\e[0;$(( 30 + ($RANDOM % 8) ))m*\n" ; done
[1] https://news.ycombinator.com/item?id=38652339I would personally like to see a set of screensavers that utilizes terminal-text-effects
That would be cool! But this is a fairly different/incompatible approach- here each frame is generated by the GPU using an actual game engine (bevy) and then printed to the terminal instead of a window- no logic for different types of characters. Maybe in the future if I replace the ascii rendering library.
That kind of text output would be really useful, because a lot of terminals don't support images.
I am also thinking, you don't need ratatui except for the "redraw whole screen" part, right? I might try to split ratatui-image into just the rendering/protocol part, so that there could be for example a fullscreen image stream crate without ratatui.
If there were significant performance improvements it would be useful to have a non-ratatui option in bevy_ratatui_render! But I would still keep the ratatui option for other reasons. So far I've just been making simple toys that only use bevy's render output, but as soon as you need any kind of text or UI, you'd want to layer other ratatui widgets on top of the ratatui-image widget.