basecamp / omakub

Opinionated Ubuntu Setup
https://omakub.org
5.61k stars 497 forks source link

Links are not clickable in alacritty/zellij #290

Closed ibrahima closed 1 month ago

ibrahima commented 2 months ago

Hi! I recently set up a new Framework 13 with Ubuntu 24.04 and Omakub. I noticed that in Alacritty, links are not clickable. This works fine in gnome-terminal. It also works fine if I start alacritty with a non-existent config file (to simulate no config). It also works if I start zellij inside gnome-terminal. But with the default configuration of Alacritty + zellij, links are just not clickable. I looked around for any posted issues but I didn't find any, which is surprising to me because I'd expect that if this was a common issue someone would have brought it up.

The easiest way to test this is to echo a url, e.g.

echo "https://www.google.com"

I have found this zellij issue but it's been resolved years ago: https://github.com/zellij-org/zellij/issues/719

My question is, 1. is this an issue that others are experiencing, and 2. if not, how can I determine what's wrong with my setup such that links are not clickable? Thanks!

florentdestremau commented 2 months ago

It's been asked here #146 , the answer is : you need to hold SHIFT to have text selection and link clicks working

ibrahima commented 2 months ago

Yeah, I noticed that in https://github.com/zellij-org/zellij/issues/719 as well but that actually does not work for me for some reason.

ibrahima commented 2 months ago

I am also confused because without shift I do have some form of text selection working, but the highlight color is almost the same as the background color so it's hard to tell. Text I select seems to be automatically copied when that happens. When I hold shift, the highlight is much more visible, but I don't know what the difference is.

Without shift - you can perhaps very barely see that the text starting from "The peach" until "education." is selected. image

Zoomed in it's slightly more visible image

With shift it's much clearer image

ibrahima commented 1 month ago

Oh, I think the very subtle selection background is from Zellij's mouse mode itself. When I copy text that way I don't get the window pane borders. I wonder if that somehow interferes with the link clicking in Alacritty?

ShallmentMo commented 1 month ago

I just make the pane large enough to ignore the border from zellij. Have to copy the link and open it by myself

ibrahima commented 1 month ago

Hmm, so you're also not able to click links without copying them? That's somewhat reassuring... Though given that I set up this laptop from scratch a couple weeks ago it seems very unlikely that it's anything I did anyway. But personally I'd rather have working links than the mouse integration in zellij... So yeah idk I need to try disabling that and see if it helps.

ibrahima commented 1 month ago

I just realized that if I use ctrl + shift I can click on links. But I think that's due to something I tweaked in my Alacritty.toml. Without that it does work out of the box if I hold shift, but because I didn't know about that I tried to add something to my Alacritty config to open links when Ctrl is pressed.

Either way though the link parsing doesn't seem fully zellij-aware, so if a link is wrapped around a pane border it won't get the full URL 😢. I guess that's a zellij issue: https://github.com/zellij-org/zellij/issues/3436

To be honest, I've never personally felt that Gnome Terminal was too slow, and I don't use zellij's capabilities much, so for me it might make more sense to just go back to Gnome Terminal instead of Alacritty for now.