wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Support xdg-activation when opening URLs

Open pcc opened this issue 1 month ago • 0 comments

Is your feature request related to a problem? Please describe.

When opening a URL when running under a Wayland compositor, WezTerm does not follow the xdg-activation protocol. As a result, if the browser handles the open URL request by opening a tab in an existing window and activating it using the activation token in $XDG_ACTIVATION_TOKEN, the tab is opened but the window is not activated. The necessary functionality was implemented in Chromium in patches landed as part of https://issues.chromium.org/issues/40747285 so this works correctly in other terminal emulators such as Kitty, but not in WezTerm.

Describe the solution you'd like

Follow the xdg-activation protocol by setting $XDG_ACTIVATION_TOKEN to a valid activation token obtained from the compositor in the process started after clicking on a URL.

Describe alternatives you've considered

Manually switching to the window where the tab opened, but it can be tedious to find the right window if I have multiple browser windows open.

pcc avatar Jun 10 '24 06:06 pcc