1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-25 21:07:39 +03:00
Commit Graph

4937 Commits

Author SHA1 Message Date
Wez Furlong
aa648797ae Include executable path and config path in version info
Use that to decide if the running version is equivalent to the
newly spawning one when deciding if we can route a command to it
or spawn a new gui
2022-01-10 17:59:53 -07:00
Wez Furlong
fc5c435949 stats: fix .size counters showing up as time counters 2022-01-10 10:36:33 -07:00
Wez Furlong
5d52902b4a invalidate fancy title bar before we potentially error out
This feels slightly more robust in the face of errors

refs: https://github.com/wez/wezterm/issues/1527
2022-01-10 08:31:10 -07:00
Wez Furlong
f48e2d9a85 SshDomain: assume_unix -> assume_shell = "Posix" 2022-01-10 08:27:09 -07:00
Wez Furlong
fe0488420b speculative fix for https://github.com/wez/wezterm/issues/1527
We need to invalidate the elements in the title bar if we reallocate
the quads, otherwise we'll be left with random stuff in the texture
coords.
2022-01-10 08:20:18 -07:00
Wez Furlong
1357480ce6 SshDomain: add assume_unix option; enables setting cwd for new panes
If we know that the remote host is a unix system, and that it uses some
version of the posix shell, then we can adjust our command line to cd to
the requested directory (as set by OSC 7) and then exec the requested
command.

That's what SshDomain::assume_unix indicates and what this commit does.
2022-01-09 21:32:09 -07:00
Chip Senkbeil
5042addb06 Add features to enable vendored-openssl for ssh2 and libssh-rs individually 2022-01-09 19:36:56 -08:00
Chip Senkbeil
1f17416e60 Support gating libssh-rs and ssh2 behind features of same name 2022-01-09 19:36:56 -08:00
Wez Furlong
b3987bec12 ssh: allow setting default_prog for SshDomain when multiplexing=None
```
return {
  ssh_domains = {
    {
      name = "woot",
      remote_address = "192.168.1.8",
      multiplexing = "None",
      default_prog = {"fish"},
    }
  },

  default_domain = "woot",
}
```

refs: https://github.com/wez/wezterm/issues/1456
2022-01-09 20:09:53 -07:00
Wez Furlong
a045cfe092 standardize on SshDomain as the way to configure RemoteSshDomain
refs: https://github.com/wez/wezterm/issues/1456
2022-01-09 19:45:11 -07:00
Wez Furlong
2f5f39b1dd cargo update, including updating zbus to 2.0.0 stable 2022-01-09 19:29:29 -07:00
Wez Furlong
79f7f63064 deps: ordered-float -> 2.10
closes: https://github.com/wez/wezterm/pull/1524
2022-01-09 19:25:48 -07:00
Wez Furlong
3593a288ea ssh: rename use_multiplexer to multiplexing
This puts us in a better position for the future to be able
to configure whether we use wezterm, tmux or no multiplexing.

Today we allow wezterm or no multiplexing.

Add docs on this new setting.

refs: https://github.com/wez/wezterm/issues/1456
2022-01-09 19:16:54 -07:00
Wez Furlong
f84c0632d8 gui: allow wezterm connect sshdomnomux
If an ssh domain is set to use_multiplexer=false, it is now
possible to `wezterm connect` to it.

Previously, it was only possible to connect to domains that
used the mux client.

refs: https://github.com/wez/wezterm/issues/1456
2022-01-09 15:52:40 -07:00
Wez Furlong
0676eed42f gui: refactor common code between ssh/connect/start subcommands 2022-01-09 15:25:00 -07:00
Wez Furlong
524663e9ce gui: refactor connect/ssh subcommands to share more code 2022-01-09 14:41:43 -07:00
Wez Furlong
59be1bf8ac wezterm ssh and wezterm serial: now support --class
Notice these were missing when compared to the other gui subcommands.
2022-01-09 13:18:08 -07:00
Wez Furlong
f69177b022 ssh: allow setting SshDomain::use_multiplexer = false
Currently has no effect.

refs: #1456
2022-01-09 13:13:54 -07:00
Wez Furlong
328aaaefd2 mux: ssh: RemoteSshDomain: defer session creation until spawn time
refs: #1456
2022-01-09 13:04:15 -07:00
Wez Furlong
80e7f0bd93 docs: missing lua from code block 2022-01-09 12:41:17 -07:00
Wez Furlong
8e0a92b2ec docs: WslDomain, default_domain, wsl_domains
refs: #1242
2022-01-09 12:23:14 -07:00
Wez Furlong
58ea5e4f11 docs: document wezterm ls-fonts 2022-01-09 11:40:37 -07:00
Wez Furlong
380a67dd85 gui: tidy up whether we use existing gui or publish as a new one
If we decide we want re-use and existing gui due to config differences
we shouldn't then publish the new, differently configured, gui as
the canonical path for that display/class.

Clarify the message that we print when re-using an existing gui
in case someone doesn't want that behavior.
2022-01-09 11:18:47 -07:00
Wez Furlong
42a13f63df cargo fmt 2022-01-09 11:12:14 -07:00
Wez Furlong
373c5900e8 changelog: associate Windows wait_message latency fix w/ more issues 2022-01-09 10:59:43 -07:00
Wez Furlong
0c73a2359f docs: changelog fix typo 2022-01-09 10:56:41 -07:00
Wez Furlong
b7e142f407 docs: revise changelog for xkbd composition changes 2022-01-09 10:55:57 -07:00
Wez Furlong
daf83b49a8 config: avoid ambiguous naming
weird that this doesn't error locally, but breaks CI
2022-01-09 10:47:29 -07:00
Wez Furlong
93c3a6381d docs: enable folding in navigation area
This helps to avoid being overwhelmed by the number of pages!

refs: https://github.com/rust-lang/mdBook/issues/1724
2022-01-09 10:13:07 -07:00
Wez Furlong
31f16375ed refactor: move Config into own module
That top level config/src/lib.rs has been too big for too long.
Break it up a little.

(I recommend running `cargo clean` if you're updating across
this change to avoid a rust ICE with it cached on-disk state)
2022-01-09 10:06:50 -07:00
Wez Furlong
3000223585 config: revise how skip-config (-n) works
Previously, it would skip loading the initial config and allow
loading it later by using the reload hotkey.  That reload behavior
was an accident!

Another problem with the old approach is that everything else was
set up as if the config had been loaded, which is now causing
confusion for code that wants to decide whether we are using
that configuration or not.

This commit formalizes the skip by remembering that state globally.

This change helps to simplify some special cases around command
line overrides as well, as well as allows cli overrides to take
effect when the user doesn't have a config file.
2022-01-09 09:33:02 -07:00
Wez Furlong
3ad91ff93e docs: changelog: note about allow_win32_input_mode option 2022-01-09 08:46:09 -07:00
Wez Furlong
41953ee5e9 docs: changelog revise wording around compose_cursor 2022-01-09 08:44:38 -07:00
Wez Furlong
627001762e rename dead_key_is_active -> composition_status, dead_key_cursor -> compose_cursor
Since the composition state isn't strictly tied to dead keys, use
a name that better reflects that.
2022-01-09 08:39:21 -07:00
Wez Furlong
ca69515e3b window: x11/wayland keyboard: try harder to populate Composing info
When a dead key is composing, we gave no information about what was
composing.  Contrast with Windows and macOS where we show the first
key in the composition as part of that state.

This commit makes an attempt to populate equivalent information.
It's a bit more complex with the xkeyboard stuff as there can be
multiple combining sequences and there's no guarantee that we can
show a meaningful label.

We try our best for the common case of a single dead key, and have
a probably reasonable fall back for other cases where we don't
other get that information.

This allows removing DeadKeyStatus::Holding.
2022-01-09 08:25:25 -07:00
Wez Furlong
430e34ad37 docs: missing changelog for https://github.com/wez/wezterm/issues/1459 2022-01-08 21:53:44 -07:00
Wez Furlong
3e99390299 LocalDomain: don't use global default_prog/default_cwd for WslDomains
They have their own versions of these options, and logically it doesn't
make sense to use the default_prog from the `local` domain with a wsl
domain.

refs: #1242
2022-01-08 16:07:22 -07:00
Wez Furlong
71bfa38cf4 input: don't scroll to bottom on key up events
refs: #1483
2022-01-08 15:37:15 -07:00
Wez Furlong
2f9ca151c2 lua: add wezterm.default_wsl_domains()
This returns the default set of domains that would be populated
in the wsl_domains config.  This is useful if you want to override
eg: the default_prog for specific domain(s), or want to otherwise
add additional variations on the default list.
2022-01-08 15:07:36 -07:00
Wez Furlong
b2ee6793f9 Add default_domain option
When set, changes the default domain to the domain with the specified
name, which potentially affects the default program.

eg: default_domain = "WSL:Ubuntu-18.04" will cause the initial tab
to be spawned via WSL.
2022-01-08 15:05:05 -07:00
Wez Furlong
cdf3fc89f7 launcher: remove WSL items from list
These are now redundant with the list of wsl_domains.

The `add_wsl_distributions_to_launch_menu` option has been removed.
2022-01-08 15:05:05 -07:00
Wez Furlong
0e9924e585 new: WslDomain, a variant on the local domain
The idea is that we want to be able to spawn into wsl with the
convenience of a local domain, but without the awkwardness of
it having a different filesystem namespace.

It would also be great to be able to spawn a new tab or pane
in the same domain and pick up the cwd of the existing one.

The WslDomain allows the user to explicitly list WslDomains
and control eg: default shell, username and so on, but wezterm
will pre-fill a default list of domains based on the `wsl -l`
output that we were already using in the launcher menu.

The existing LocalDomain has been augmented to understand that
it may need to fixup a command invocation and that gives it
the opportunity to rewrite the command so that we can launch
it via `wsl.exe` and pass down the cwd and so on.

This same technique might be extensible to eg: docker instances
in the future.

This commit:

* Introduces `wsl_domains` config and its default list of wsl
  distributions
* Creates LocalDomain instances from that list
* The launcher menu allows spawning a new tab via one of those domains
2022-01-08 15:05:05 -07:00
Wez Furlong
b109730b18 disable win32-input-mode by default
Until we can figure out why running wsl breaks CTRL modifiers!

refs: https://github.com/wez/wezterm/issues/1509
2022-01-08 09:37:48 -07:00
Wez Furlong
6d844f28ab update conpty to d7d89ef354
Our last update was more than 6 months ago.

refs: https://github.com/wez/wezterm/issues/1509
2022-01-08 09:37:48 -07:00
Wez Furlong
6afc35507c window: macos: fix lalt-` in default config w/ US layout
lalt-` is technically a dead key combo, so we entered dead key
processing, then realized that
`send_composed_key_when_left_alt_is_pressed == false` and that
we should ignore the dead-key-ness of the combo, but returned
a composed result, which had the modifiers discarded.

The correct way to handle this is to signal that it wasn't
dead after all and to allow the main flow to build the KeyEvent
as normal.
2022-01-07 23:53:23 -07:00
Wez Furlong
10ea932965 docs: changelog for https://github.com/wez/wezterm/issues/1398
and https://github.com/wez/wezterm/issues/1013
2022-01-07 21:23:15 -07:00
Wez Furlong
f2ed459359 docs: changelog for key input stuff
closes: #601
closes: #1080
closes: #1391
2022-01-07 21:18:30 -07:00
Wez Furlong
c383ee218d docs: changelog for https://github.com/wez/wezterm/issues/877
closes: https://github.com/wez/wezterm/issues/877
2022-01-07 21:14:42 -07:00
Wez Furlong
2a6a842362 docs: changelog for https://github.com/wez/wezterm/issues/1131
closes: https://github.com/wez/wezterm/issues/1131
2022-01-07 21:13:04 -07:00
Wez Furlong
3ca840a0ab docs: changelog for win32-input-mode
closes: #318
closes: #1509
closes: #1510
2022-01-07 21:08:50 -07:00