HNHacker News
TopNewBestAskShowJobs

cxreiff

59 karma · joined August 24, 2024

submissionscomments
cxreiff··on Show HN: Screensavers for your terminal (Bevy/Ratatui)
Oh, hello! Thank you for your wonderful library, it made this very easy. :)

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.

cxreiff··on Show HN: Screensavers for your terminal (Bevy/Ratatui)
Definitely something I want to do down the line... something like the Sobel filter approach that acerola uses in this video: https://youtu.be/gg40RWiaHRY?si=DWtt-fdSUVADFNS_
cxreiff··on Show HN: Screensavers for your terminal (Bevy/Ratatui)
Oh, thank you! I'll look into this. I'm a little apprehensive of tmux because I've had it mess with ANSI colors before, which this relies heavily on. But it would let me get this to trigger while things like neovim are open, so maybe worth it...
cxreiff··on Show HN: Screensavers for your terminal (Bevy/Ratatui)
Bevy lets you create a custom render pipeline, so you just have to get the rendered image and send it to ratatui instead of a window. I handled that part in bevy_ratatui_render (https://github.com/cxreiff/bevy_ratatui_render) which just gives you a bevy Camera and a ratatui Widget that draws the latest frame.
cxreiff··on Show HN: Screensavers for your terminal (Bevy/Ratatui)
Its an old windows screensaver! https://www.youtube.com/watch?v=MHGnSqr9kK8

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.

cxreiff··on Show HN: Screensavers for your terminal (Bevy/Ratatui)
I made some screensavers that you can have run after a period of inactivity in your terminal. I'm using bevy to generate frames and then ratatui/ratatui-image, through my plugin bevy_ratatui_render (https://github.com/cxreiff/bevy_ratatui_render), to render those frames. The period of inactivity part only works in ZSH because I'm using the TMOUT env variable– please let me know if you know another way!