Open bogzbonny opened 1 year ago
Thanks for loving it! I will try to see if I can implement that soon, I never thought about it but it shouldn't be that hard, I have been using it in some kitty tests. Great suggestion from you :) I wonder how you think it should work, should it be an option? a default? how should I choose between sending files names and pixels ?
Oh yeah interesting question ... judging by your design so far, I'd recommend adding this feature as an option within your current Options struct. Also I'm looking at the options struct right now, and I'm thinking it may a bit more sense to group all your kitty options together under a common enum
. For instance, is it not bad state if the user sets both the clear
and load
to Some(...)
?
I'd personally probably do something like this:
pub struct Options {
..
kitty_op: Option<KittyOp>,
}
pub enum KittyOp {
Load(u32),
LoadRemote(u32),
Display(u32),
Clear(u32),
}
As far as I can tell pic currently has the best system for interfacing with kitty image protocol as it allows for handling of kitty image ids... hence it's my fav rust cui image viewing library!
One things that's missing is remote pixel transfer. This is cool for a few reasons, but I'm most interested in remote viewing such that temp-file artifacts aren't left around (also good for SSHing)
https://sw.kovidgoyal.net/kitty/graphics-protocol/#transferring-pixel-data
viuer implemented it reasonably well here https://github.com/atanunq/viuer/blob/master/src/printer/kitty.rs#L154
Here is snippet of some of my adapted code (which you're welcome to use in implementing this feature if you desire).