[Feature] Custom animation support #719
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pre-requisites
Wanted behavior
sorry for stupid question, I just didn't found any information and commenced configuration of system like some days ago
I want this too, thou I do not know how to program in zig but an image to ascii art is probably the best approach since ly is purely text based.
I third this, would like an ASCII splash on the login page. Something a little more personalized
It may be possible to implement the
.durfile format, as described here and brought to light in #743.is it possible to set image background (or gif animation)to [Feature] Custom animation supportWe could use .so files.
Ly could invoke our .so's "draw" function, passing us screen dimensions and a buffer to draw to for each frame, then it can draw the boxes and other info over that.
Downside being that this would only offer support for compiled languages. That said, and perhaps this part is more of a community initiative than something for the main repo, i guess we could also create wrappers that call out to interpreters if wanted.
But perhaps a more secure option would be to use wasm? I doubt it'd be much, if at all, more of a hurdle for interpreter users either.
By no means a zig dev, but a brief search suggests it could work quite swimmingly. There's the standard bindings to the wasmer api; which should enable for the creation of a host that loads and executes 3rd party functions, and there's also zaw; a, less complete but, zero-allocation framework/protocol though I'm not sure it's exactly intended for such a use case. We'd probably need to buffer for it because of ansi codes.
https://github.com/zig-wasm/wasmer-zig-api
https://github.com/stylearcade/zaw/blob/main/docs/protocol-conduit.md
I have some security & reliability concerns with this method, given that this would essentially allow arbitrary code execution. This'd be the best method customisability-wise, but I'm not sure the security sacrifice is worth it. Also, that means if the animation code segfaults, Ly is brought down too, which isn't great... not that Ly is the most reliable product ever, but if I can avoid more issues, I'll gladly do so. xD
Very, very, fair! In case you missed it, I also suggested wasm.
Here's another potentially fruitful library for it:
https://github.com/malcolmstill/zware
@kendfss wrote in #719 (comment):
Right, though I'm not sure if adding an entire WASM runtime for just a few cool pixels is worth it. Especially when there's #833 which implements what essentially is a GIF in a terminal.
Great work the both of you! Excited to play with this!