119 points · by cxreiff · 2y ago · 21 comments
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).
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.