smol-potat hasn't had updates in 4 years and was bifurcating some
big deps. It wasn't necessary; it was trivially easy to replace
with smol::block_on with no meaningful increase in boilerplate,
and the result is much more understandable in purpose and effect.
We should watch the child window for exposure events, not the parent
window (the parent window is just a background color and we never paint
to it).
This was a regression from commit 809bcc55.
Fixes#5405.
Newer wayland protocol expects us to mmap the keymap file
descriptor (and do so with certain mmap flags).
The current code tries to handle both normal files and pipes,
but neither will work in some cases.
This updates the code to use xkbcommon's new_from_fd,
which is what the toolkit uses, and mmap's the file.
This fixes#5393, which was caused by hanging when
trying to read the file as if it was a pipe.
wezterm ignores wrapped long line when alt screen is used and tmux uses
alt screen that makes copying wrapped long line into multiple lines.
After testing on sevaral tui apps like tmux, w3m, htop it seems to show
reasonable performance on resizing.
Fixes#5283
This is useful (essential!) for fixing up the default auth sock
under gnome, as we do not have a way to do that via whatever
logic may be present in the shell startup files.
This is done with a wezterm twist: not only is the auth sock forwarded,
but the mux on the remote end will automatically maintain a symlink to
point to the auth sock of the most recently active mux client, and set
SSH_AUTH_SOCK to that symlink so that your remote panes should always be
referencing something sane.
refs: https://github.com/wez/wezterm/issues/1647
refs: https://github.com/wez/wezterm/discussions/988
This commit expands the set of data that we track for each client to
include the SSH_AUTH_SOCK. This defaults to the value of that env var on
the machine where the ClientId is constructed, which may be remote from
the mux server.
For the proxy scenario, a remote SSH_AUTH_SOCK path is not addressable,
and what we really want is the local SSH_AUTH_SOCK path from that SSH
session, so we introduce awareness of whether the current session is a
proxy session. Proxy sessions register the mux-local-proxy-id during the
setup of the proxy, but we don't apply the identity to the mux. Instead,
we wait for the remote client to send their identity and that is
annotate to show that it has been routed via a proxy and, crucially, has
the SSH_AUTH_SOCK replaced with the mux-local-proxy-id SSH_AUTH_SOCK.
```
; wezterm cli list-clients
USER HOST PID CONNECTED IDLE WORKSPACE FOCUS SSH_AUTH_SOCK
wez foo 336500 86.944834352s 944.834352ms default 3 /home/wez/.1password/agent.sock
wez foo (via proxy pid 337457) 337314 1.944834352s 944.834352ms 4 /tmp/ssh-XXXXTfGSp7/agent.337456
```
For the SSH_AUTH_SOCK to be populated, ssh agent forwarding also needs
to be enabled for SSH exec() calls; previously it was enabled only for
pty channels.
Since this commit changes the ABI of the mux protocol, the codec
version has been bumped.
This enables users to override the normal invocation completely,
which is helpful for example when connecting into a gui from
a remote host.
I was wondering why prefer-mux was in here, and my commit message
from 7afc9e4d56 suggests that I
hit an issue where the gui wasn't running and where I didn't care
because I wanted to hit the mux.
I think that makes it a little awkward to blanket remove the
--prefer-mux flag, but for those that don't want it, they should now
be able to configure to allow connected to the gui
```
ssh_domains = {
{
name = "shortname",
remote_address = "hostname",
override_proxy_command = "wezterm cli proxy",
},
},
```
This resolves an issue where `WEZTERM_UNIX_SOCKET=something wezterm cli
proxy` would use `something` for the unix domain path when checking that
an existing instance was up and running, but would then use the default
implicit socket path when dropping into the proxy passthrough stage.
What we do here is transform the connected client into its configuration
and use that instead of trying to re-derive the socket from incomplete
information.
The motivating example is using SSH to get into a workstation that
is running a GUI wezterm with no explicit unix domain mux.
We can't hope to keep the renderer's idea of the window size consistent
with the actual window size when the user can asynchronously change its
size at any moment. Therefore, we create a child window which we render
to and which we synchronously resize in response to async resizes. Since
by default the contents of X11 windows are undefined on resize, we take
the additional steps of setting our windows' X11 background color and
bit gravity as appropriate.
- was dropped with wayland reimplementation (#4777, 3eaba4e3d6)
- get appearance from xdg desktop portal
- advise all windows of appearance changes to reload config