gizak / termui

Golang terminal dashboard
MIT License
13.07k stars 783 forks source link

Reimplement image widget using sixel #213

Open cjbassi opened 5 years ago

diamondburned commented 5 years ago

I really want this feature to happen. Is there anything I can do to speed this up?

cjbassi commented 5 years ago

Hi, thanks for asking. So I'm actually not really familiar with sixel, and I don't even know if we can get it to work with termbox-go (but it would be really nice if we could), so I guess the first step would be to figure out some of this preliminary stuff. We would probably need a Go library for sixel, I just found go-sixel which might work. We also need to figure out if termbox-go will let us draw to the terminal when its running. It usually only accepts unicode characters, not escape sequences, but I'm wondering if we could find a way to draw over it when its running.

So basically, if you want to play around with some of this stuff (including go-sixel) and report back what you find that would be great :D

diamondburned commented 5 years ago

I did try making a bytes reader and forward that to a TextView or something on termui, but the escape chars are stripped. I also tried playing around with termbox-go, but all the []rune low level stuff was too hard for me. I also tried looking into termbox-go, but I have no idea where they stripped the escape codes. If you could give me an idea on this one, that would be really helpful.

I did, however, try to play around with go-sixel. It worked fine in my forked xterm.

srlehn commented 5 years ago

implemented sixel support which needs further testing over at #233. I hope that someone else finishes it.