Comments (18)
Implemented for Linux, Windows, BSD and MacOS. Coming for upcoming version
from rio.
Will do, but next version (needs to be tested carefully don't affect performance for other cases)
from rio.
fyi started to implement it
from rio.
To be honest I wouldn't mind having the handler in the Cmd key instead if that's possible.
from rio.
Actually never mind, found a bug with OSC 8 implementation that was preventing to show for majority of cases. Added the fix in 3078e63
![Screenshot 2023-11-11 at 13 01 18](https://private-user-images.githubusercontent.com/3630346/282240396-9b1c3252-6819-4bff-8827-5e71dc8701e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYzMDMzODMsIm5iZiI6MTcxNjMwMzA4MywicGF0aCI6Ii8zNjMwMzQ2LzI4MjI0MDM5Ni05YjFjMzI1Mi02ODE5LTRiZmYtODgyNy01ZTcxZGM4NzAxZTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDUyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA1MjFUMTQ1MTIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDMwMWYxMmU5NDg0MTBiNDA2OWQzMGQ4YjY2NWFjOTUxM2RiOGMyOWUwYzJjNGMzZmEwMjU3OThmODk5NzYzYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.7Llg7mlwOMnlm9P-8C4aVgEYI-NRFWFQmykZC1UzohE)
from rio.
@raphamorim In which version this would be implemented? Does this require some work on sugarloaf? How to implement this in sugarloaf?
from rio.
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)
from rio.
Ok, when I have time I will try and implement it
from rio.
Waiting for this feature
from rio.
@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
- mouse moved, get the current line and run the regex on it (this needs to be iterated in the PR or after the PR, because the link data is saved through lines/cell)
- add the underline for cells that have the links enabled.
from rio.
@OlshaMB did you start? otherwise will pick this issue after the #186 implementation
from rio.
@raphamorim Sorry didn't have time, so no, did you start to implement it on main?
I think I will try to implement it this weekend
from rio.
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.
from rio.
Implemented in main for MacOS (holding command and hovering the link allows the click), Linux/BSD does work now with xdg-open
with super key but will be changed alt
(as windows)
Documentation will be update once all platforms have support (will be wrapped up before next version 0.0.26 release)
from rio.
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
from rio.
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)
from rio.
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)
from rio.
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.
If OSC8 isn't working for you with the hyperlink in URL, then it's a bug I can take a look
from rio.
Related Issues (20)
- bug: vi mode on Windows HOT 1
- Unexpected basic 16 terminal colors displayed on some apps HOT 7
- Application does not respond on Wayland HOT 1
- BottomTab does not update on windows when switching tab and exit immediately HOT 1
- Glyphs have very weird rendering HOT 6
- Layout support HOT 1
- Linux Wayland: WA migration
- Linux X11: Wa migration
- Windows: WA migration
- Fix cached run on lines that crashes few times [sugarloaf] HOT 1
- Load emoji and falllback fonts on demand and drop memory after not being used anymore leaving only the file path as reference
- Are ligatures actually supported in 0.0.36? HOT 3
- newline issue when pasting multi-line text
- [Bug] Noticeable text update HOT 4
- [Bug] Noticeable text update
- [Bug] Tab indicator doesn't disappear HOT 2
- [Bug] The `[colors]` option does not override theme colors. HOT 3
- zsh with glyphs won't render HOT 2
- Changing zellij pane with <alt> + arrow does not work HOT 3
- [Feature] Add support for choosing font width HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rio.