Skip to content

Conversation

@alvin883
Copy link

In wezterm, they had their own method (wezterm connect) to run wezterm daemon on the remote that uses ssh as a channel

reference: https://wezfurlong.org/wezterm/multiplexing.html#ssh-domains

Because of that, default env such as WAYLAND_DISPLAY & DISPLAY is still exist, so when we run helix through wezterm connect and yank selections to clipboard (<space>y) it doesn't do anything (somehow in my case helix will just hang? idk why)

Therefore we need to check for WEZTERM_UNIX_SOCKET before anything else, and just use fallback provider for that, so we can copy to clipboard even with wezterm connect 🎉

Thanks!

@pascalkuthe
Copy link
Member

pascalkuthe commented Apr 26, 2024

how would this interact with tmux users on wezterm? I think they would still want to use the tmux provider?

@alvin883
Copy link
Author

@pascalkuthe I never use tmux in wezterm because that's suppose to be a replacement, but since you mentioned it, now I updated to code to prioritize tmux provider if it's used inside wezterm connect

Before

I've tested with current master, apparently copy to clipboard is not working for both wezterm & tmux inside wezterm connect, because it's detected wayland env

wezterm connect
image

tmux in wezterm connect
image

After

wezterm connect
image

tmux inside wezterm connect
image

Thank you!

@archseer archseer added this to the next milestone Aug 9, 2024

if env_var_is_set("WEZTERM_UNIX_SOCKET") && binary_exists("wezterm") {
Box::new(provider::FallbackProvider::new())
if env_var_is_set("TMUX") && binary_exists("tmux") {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you refactor this so that the tmux check and provider definition is not duplicated (it already exists on line 146) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants