Better HN
topnewbestaskshowjobs
Log inSign up

cxreiff

59 karma · joined Aug 24, 2024 (2y ago) · 7 submissions

Submissions

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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_

comment 2y ago · link · parent

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...

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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!

7.

Show HN: Screensavers for your terminal (Bevy/Ratatui)(github.com ↗)

119 points · by cxreiff · 2y ago · 21 comments