Commit Graph
74 Commits
Author SHA1 Message Date
Wez Furlong 5d6bc3882c require all domains to have names 2019-08-05 11:04:56 -07:00
Wez Furlong 51c336d94f remove SshDomain.direct_pty
Now that we have `wezterm ssh ...` we don't need this to be in the
configuration.
2019-08-05 09:43:02 -07:00
Wez Furlong c294b4d7a1 allow direct ssh pty
This basically works, but I want to tidy up how we enable this kind
of connection; right now its a bit of a hack.
2019-08-03 12:47:55 -07:00
Wez Furlong 348575854d Capture terminal errors and show them in a message box
This helps diagnose problems where stderr is not visible.
Let's also capture them to the `log` stream too, and clarify
toml parsing errors, and fix the underlying problem with
ssh_domains not being allowed to be left unspecified.
2019-07-30 08:45:39 -07:00
Wez Furlong a7722beb0a add support for unix mux via ssh
This adds an ssh domain config type that allows us to ssh to a remote
host and then proxy the unix domain mux protocol over the ssh session.
2019-07-28 16:15:44 -07:00
Wez Furlong 25bb43262d unbreak the default windows pty
I was too focused on the wsl case and didn't test this.  We can't
redirect the process handles without causing some problems with
starting up cmd.exe.   Comment out that portion of the code for
the moment.
2019-07-16 23:04:38 -07:00
Wez Furlong 48a12da096 capture logs on startup on win32, fixup spawning wsl from gui 2019-07-16 14:14:40 -07:00
Wez Furlong 34ae350d88 allow spawning a server inside wsl 2019-07-16 09:05:35 -07:00
Wez Furlong 4c6768fd2b fixup windows build 2019-06-22 13:40:41 -07:00
Wez Furlong be345853cd allow spawning the server automatically when connecting via unix domain 2019-06-22 13:22:28 -07:00
Wez Furlong 4c877d493f add --daemonize flag 2019-06-22 12:44:22 -07:00
Wez Furlong 33f17eaf3f remove WEZTERM_SKIP_MUX_SOCK_PERMISSIONS_CHECK env var in favor of config value 2019-06-22 11:01:17 -07:00
Wez Furlong 6c8d296c44 respect the connect_automatically configuration
For unix and tls clients, if connect_automatically is set
and we're not running the server, then instantiate and connect
to those domains when we start the app.

As part of this I realized that we weren't mapping the remote
tab to the local tab for unilateral pushes, so add some stuff
to support that.
2019-06-22 10:13:02 -07:00
Wez Furlong 9054343e51 factor out tls client configuration
We can now also specify multiple tls clients
2019-06-22 09:08:31 -07:00
Wez Furlong 86251f1787 factor out tls server configuration
Can now specify multiple servers if desired.
2019-06-22 08:44:14 -07:00
Wez Furlong 712089a5de refactor unix domain configuration
It is now possible to specify multiple domains with varying
configuration.
2019-06-22 08:21:25 -07:00
Wez Furlong fcc2b1ab7d rejigger tab spawning hotkeys
cmd-t now spawns in the same domain as the active tab,
cmd-shift-t spawns in the default domain.

It is possible to define bindings to spawn in an arbitrary domain.
2019-06-22 07:46:49 -07:00
Wez Furlong 9978c1234c restructure throttling around scanning and pushing changes 2019-06-21 08:44:10 -07:00
Wez Furlong 4ddef39b52 ratelimit unilateral pushes 2019-06-21 07:56:09 -07:00
Wez Furlong 9a4ae0a06b ratelimit child process output
In the early days we relied upon the bounded length of a sync channel
to put back pressure on the output from a child command.  We're no
longer using that kind of channel, so here's a more deliberate and
measurable rate limiting implementation.

The `ratelimit_output_bytes_per_second` configuration setting defaults
to 2MB/s and constrains the amount of text we send to the escape
sequence parser.

This value was selected based on it being a combination of responsive
to ctrl-c while outputing a lot of data and still generating sleeps
to remain within the constraints.

This does mean that terminal benchmarks that test how quickly you
can dump text to the terminal will hit this artifical upper limit
and are thus not going to be a true measure of performance.
2019-06-21 07:16:37 -07:00
Wez Furlong 4ad7ff3083 use openssl directly for the client when that feature is enabled
This removes some redundancy and overhead around setting up the
connection (the native_tls crate doesn't provide PEM functions,
despite every deployment I've ever seen only ever using PEM certs),
but more importantly, gives the control needed to make hostname
verification work in a PKI setup with unusual CN values.
2019-06-20 17:27:40 -07:00
Wez Furlong 83de1117ff add tls mux client
The latency is not great, and there are more authentication and
authorization features that need to be added, but this shows that
we can connect and talk to a remote muxer.
2019-06-14 06:40:02 -07:00
Wez Furlong f86b65270b add basic tls listener
We don't yet have a client that knows how to connect to it
2019-06-14 06:40:02 -07:00
Wez Furlong c8ad858a29 connect domain id to spawn_tab
Even though we currently only have a single domain, we're now able
to spawn tabs in alternate domains.
2019-06-08 21:31:33 -07:00
Wez Furlong 000c5eddac Add CloseCurrentTab key binding
Added CMD-W as a default binding for this action.

refs: https://github.com/wez/wezterm/pull/26
2019-06-08 10:27:45 -07:00
Wez Furlong f10e59245e add Hide/Show key actions
Usage example is to put this in your `wezterm.toml` to get the
macOS CMD-M shortcut for minimizing a window:

```
[[keys]]
key = "m"
mods = "CMD"
action = "Hide"
```

Refs: https://github.com/wez/wezterm/issues/32
2019-06-08 08:37:50 -07:00
Wez Furlong 3b94cddf8e allow specifying key bindings in wezterm.toml
refs: https://github.com/wez/wezterm/issues/32
2019-06-08 08:28:34 -07:00
Wez Furlong f87901c484 tidy up some failure usage 2019-05-26 08:58:59 -07:00
Wez Furlong 7bf1d99d77 move pty to its own crate in preparation for publishing
Refs: https://github.com/wez/wezterm/issues/27
2019-05-19 18:40:26 -07:00
Wez Furlong d040b94b62 add config option to select pty system 2019-03-25 19:35:13 -07:00
Wez Furlong 10165fac32 traitify the pty module 2019-03-25 11:45:52 -07:00
Wez Furlong 2184a393c5 fix compilation on linux 2019-03-23 19:08:22 -07:00
Wez Furlong 67a57f12af Add basic install script and icon
The icon comes from "Smoothicons 7" by Corey Marion which I found
as a royalty free icon searching the internet.  I would love to
have a purpose built icon, but this is sufficient for now.

The install script sets up a macOS application bundle that references
the generated wezterm binary and the icon.  The same technique could
be used to generate a .desktop file for linux.

I've changed the default-prog on macos to be `login -pf $USER` as
that is a better default experience on macOS.
2019-03-23 18:41:10 -07:00
Wez Furlong 7cdd1876d1 Enable serializing various Line and Cell related structs 2019-03-22 20:41:50 -07:00
Wez Furlong 6575f50ffc the directories crate spawns a lot of children! stop using it
The `directories` crate unconditionally and eagerly tries to spawn
`xdg-user-dir` for all possible directories that it might be asked
about.  This is relatively expensive and undesirable.

Shift to the `dirs` crate instead, which doesn't seem to need
to run `xdg-user-dir` at all.

Maintain these probed dirs as singletons via lazy_static.
2019-03-22 20:41:50 -07:00
Wez Furlong ea8fa17f6e add config for the mux socket path 2019-03-22 20:41:50 -07:00
Wez Furlong 943fd74d5e rename GuiSelection -> FrontEndSelection 2019-03-22 20:41:50 -07:00
Wez Furlong bc313522a8 restructure to put gui loop and window impls closer together 2019-03-22 20:41:50 -07:00
Wez Furlong 4b5d51f708 remove old fontconfig pattern code 2019-03-22 20:41:50 -07:00
Wez Furlong 551630c3a6 add missing windows specific constraint 2019-03-13 08:04:23 -07:00
Wez Furlong bb8c2c7876 adjust windows font fallback
I still can't get the emoji to render on windows, but these font names
are more appropriate choices.
2019-03-02 13:09:29 -08:00
Wez Furlong dba88d2102 clippy 2019-02-24 12:01:08 -08:00
Wez Furlong d113068fb0 add default_prog configuration option
@PedroHLC request this and it is easy enough to add, and gave me
the opportunity to clean up some code a little bit.
2019-02-22 18:48:38 -08:00
Wez Furlong 7277559abc fixup linux build for changes I made over on macOS 2019-02-22 15:58:19 -08:00
Wez Furlong 332b0faeaa CoreText renderer is now the default on macOS
I've added dingbats to the fallback list on macos as that is needed
for some symbols we use in tools at work.

With that, and some tweaks for allowing for missing letter glyphs
when loading a symbol font as a fallback, we can make that the
default for macOS

Closes https://github.com/wez/wezterm/issues/5
2019-02-22 15:51:36 -08:00
Wez Furlong a5b5f82c6c font fallback now also applies to italic, bold etc.
This means that emoji now render when the text is italic
2019-02-20 20:52:46 -08:00
Wez Furlong b0f7a9d797 inching towards sane emoji rendering with glutin frontend 2019-02-20 17:44:35 -08:00
Wez Furlong 314f7cc103 Allow runtime selection of gui system
This allows choosing between X11 and Glutin, which simplifies some
conditional code and allows some short term flexibility on unix
systems.  However, what it really opens up is running a future
headless server mode (think: tmux).

This change comes with the cost of temporarily breaking creating
a new window on x11.
2019-02-19 23:39:13 -08:00
Wez Furlong 571562351d migrate wezterm to 2018 edition 2019-02-18 23:17:33 -08:00
Wez Furlong 3dfaf7111f allow runtime selection of font loader/renderer
This cleans up the rats nest of conditional build bits
and allows easier testing and comparison of the systems.
2019-02-18 22:02:31 -08:00