-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support OSC 8 (hyperlinks) to make previews clickable #37
Comments
Thank you for the kind words. That sounds like a potentially useful addition iff it can be done in a way that preserves the simplicity of lsix. One problem is that the thumbnails are generated in blocks and they are not necessarily aligned with character cells. We would need a simple and efficient way to mark the character cells for each image. You wouldn't happen to have written code to do that yet, would you? Also, I've read the official DEC documentation and Xterm's ctlseqs, but never run across OSC 8 before. Do you have a reference to where it is defined? |
Have a look here: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda Mind, the list on that document is not complete anymore, but it contains a very good specification. Also, I just implemented sixel graphics basic support in my own terminal emulator and have been looking for client apps using that so I can test on it. So I found you, too. And cake up with the above idea. |
It's a good idea. But it looks like it will add too much complexity to I have another sixel project I'm working on, an image viewer, that is not released yet. Fitting the URLs into it would not be as hard as I aligned the images with the character cells. If you send me e-mail (hackerb9@member.fsf.org), then I can share with you the preliminary code so you can test your terminal emulator. |
By the way, can you please send a link to your terminal emulator? I added the OSC 8 URL escape to the thumbnails in the sixel image viewer I mentioned, but I have no idea if it worked or not. The sixel terminal emulators I have tried (xterm & mlterm) don't support OSC 8 and the OSC 8 emulators (all VTE based) don't support sixel. Sounds like your program will fill a niche! |
Hey. You can find it here: https://github.com/christianparpart/contour/ The sixel support is in the development branch named, I tested OSC-8 together with image support and it works in Contour. I will email you, too |
Here's the implementation from Windows Terminal: microsoft/terminal#7251 (there are follow-up PRs that improve the story of hyperlinks including adding File URIs as a acknowledged scheme (though with some limitations still in place). |
And an excellent idea it is! 🥮 I'm sorry I lost track of this for nearly a year. I had meant to clean up my sixel image viewer code so it was presentable before publishing it, but I realized that I should just get it out there. Here is vv, a very basic sixel image viewer that uses OSC 8. The hand symbol shows up in Contour when I hover but nothing happens when I left or right click. Does Contour show the URL when hovering over a link? I'm not seeing anything. I'll have to reread the OSC 8 spec. |
Use Ctrl modifier with left click. That is also configurable in the input mappings.
No. But really good idea. Will add that. |
Nice. It works now. Is it a known problem that Contour sometimes coredumps on sixels? |
On sixels? That is new! But resize in alt screen and then leaving alt screen causing a SEGV is known. I am working on that. Maybe you can get me a stack trace of such thing as a new ticket ? :-) |
@christianparpart Ticket sent. |
Hi,
I really like your little tool, and I'm surprised that a shell script is sufficient for that (with help of ImageMagick).
I'd like you to consider adding hyperlink (OSC 8) support so the generated previews are clickable. This would be a great addition, what do you think?
The text was updated successfully, but these errors were encountered: