-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
hyperlink in url #60
Comments
@raphamorim In which version this would be implemented? Does this require some work on sugarloaf? How to implement this in sugarloaf? |
Haven't implemented yet @OlshaMB, the missing piece work that needs to be done is whenever the mouse is over the line, needs to run the regex to check if contains a link and then update the sugar to add underline (is similar of how alacritty works in the source code) |
Ok, when I have time I will try and implement it |
Waiting for this feature |
@OlshaMB alacritty runs the link preview for each draw (to inspire https://github.com/alacritty/alacritty/blob/7ceb638ff80eca99ac63df5fd8cbb2f703d4637a/alacritty/src/display/mod.rs#L813-L840), rio will not do this way since the renderer is not trigger per time interval (unless you use blinking cursor) but for key events and tty updates. In rio should work like
|
@raphamorim Sorry didn't have time, so no, did you start to implement it on main? |
I wrote in a branch but haven't finished yet. What works so far is recognize the link, save to cells and update style to underline. |
Implemented in main for MacOS (holding command and hovering the link allows the click), Linux/BSD does work now with Documentation will be update once all platforms have support (will be wrapped up before next version 0.0.26 release) |
Great work! One small remark/question: I noticed that the link behavior with the underline only triggers if I move the mouse, so if I just leave the mouse over the link and click the Cmd button, the link doesn't activate, only after moving the mouse. Is it expected to be like that? I know it's just nitpicking but still worth checking! 😄 Screen.Recording.2023-10-30.at.10.08.22.mov |
Yes, this is known. The way rio implemented the links is to avoid running regex without necessity so you actually need to interact with link to activate. It should be better with time (like press command and hit the link directly, but the handler now is in the mouse moving listener) |
To be honest I wouldn't mind having the handler in the Cmd key instead if that's possible. |
Will do, but next version (needs to be tested carefully don't affect performance for other cases) |
This works well for me here on my (niche) setup - the project as a whole surprised me to be honest as wezterm was a train wreck qua performance on my platform (Android). However it seems that while you have OSC 8 / hyperlink marked as IMPLEMENTED you haven't yet connected the two parts? Is this a safe assumption? Is there any chance there is a plan to do so? I'm currently running xfce4-terminal for the sixels and tilix for the tabbing capabilities but would like to unify (bonus, xfce4-terminal took me hours to get building vs 10 minutes or so for your project, tilix also has too many deps alas) |
Hey @lypanov thanks for the message. Rio does implements OSC 8 https://github.com/raphamorim/rio/blob/main/rio/src/performer/handler.rs#L604-L622 , although it will still required to hold the key to enable the click. |
Actually never mind, found a bug with OSC 8 implementation that was preventing to show for majority of cases. Added the fix in 3078e63 |
make the links (http:// and https://) clickable
example:
The text was updated successfully, but these errors were encountered: