1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-02 23:55:11 +03:00
Commit Graph

1591 Commits

Author SHA1 Message Date
Wez Furlong
cb9fd7db5b respect enable_tab_bar on config reload 2019-11-24 20:33:14 -08:00
Wez Furlong
80719f419d changes to ratelimits now take effect on config reload 2019-11-24 20:24:58 -08:00
Wez Furlong
1ba720b28c automatically reload config when the file changes 2019-11-24 19:20:14 -08:00
Wez Furlong
95c957564a reload keymap when config is reloaded 2019-11-24 17:25:28 -08:00
Wez Furlong
1bf0402844 fixup submodules 2019-11-24 13:41:32 -08:00
Wez Furlong
e556e03793 fix CI: savannah is down, use a github mirror for freetype 2019-11-24 13:28:02 -08:00
Wez Furlong
fd78a0b3ce Allow reloading hyperlink rules from the config at runtime 2019-11-24 13:12:54 -08:00
Wez Furlong
7c7825c070 term: extract configuration to a trait
This isn't complete but begins the process of extracting
the embedding application configuration into a trait provided
by the application rather than passing the values in at
construction.

This allows the application to change configuration at
runtime.

The first option to handle this is the scrollback size.
2019-11-24 12:43:41 -08:00
Wez Furlong
e56dfa9875 config reloading now also applies to fonts
This change also causes any/all windows to pick up the reloaded config
2019-11-24 10:24:33 -08:00
Wez Furlong
88cd29213f Add hotkey (defaults: SUPER-R, and CTRL+SHIFT-R) to reload config
The effects are most noticeable when spawning a new tab;
try changing the background color in the config file,
reloading it and spawning a tab!
2019-11-24 09:27:31 -08:00
Wez Furlong
d06c08e0f3 config: expose configuration generation number 2019-11-24 09:19:14 -08:00
Wez Furlong
8996f897b9 remove Mux::config in favor of config::configuration()
The idea is to centralize accessing the config to that
function so that we can implement config reloading.
2019-11-24 09:07:46 -08:00
Wez Furlong
72b55d3982 config: lay foundation for config reloading 2019-11-24 08:28:30 -08:00
Wez Furlong
07c6ca94da move some code around in config/mod.rs 2019-11-24 07:56:38 -08:00
Wez Furlong
eed6049902 tidy up config imports a little 2019-11-24 07:55:13 -08:00
Wez Furlong
0f64357203 change default font size to 10pts
I realized that I had set this to 10pts in my configs, and after running
with the default for a bit today, I agree with @chadaustin that we
should be smaller by default!
2019-11-24 07:51:10 -08:00
Wez Furlong
1d5e36a97c split more config into separate modules 2019-11-24 07:50:13 -08:00
Wez Furlong
955361433d split daemon options out of config/mod.rs 2019-11-24 07:37:42 -08:00
Wez Furlong
2960b9186c config.rs -> config/mod.rs + config/keys.rs 2019-11-24 07:35:12 -08:00
Wez Furlong
517084ff2f clippy 2019-11-24 07:20:41 -08:00
Wez Furlong
385b3bedbd move some config defaults into the config module 2019-11-24 06:56:41 -08:00
Wez Furlong
e904e11e58 tab bar: default to enabled 2019-11-23 16:58:37 -08:00
Wez Furlong
10a0006eaf window: fix build for examples post mouse coords changes 2019-11-23 16:46:46 -08:00
Wez Furlong
bbe9c6e14b window: Windows: allow dragging by the tab bar 2019-11-23 16:43:25 -08:00
Wez Furlong
ef0f53ab7b window: Windows: fix mouse screen coordinates 2019-11-23 16:00:27 -08:00
Wez Furlong
d778d8b130 disable csi-u sequences by default
I keep holding shift while pressing space and seeing stuff get
undone in vim.  Super annoying.  I didn't see a good way to
teach applications about this via terminfo, so this is off
by default for now.

refs: https://github.com/wez/wezterm/issues/63
2019-11-23 15:04:54 -08:00
Wez Furlong
f3f61b47dc tab bar: add new tab button to tab bar 2019-11-23 14:57:17 -08:00
Wez Furlong
a28e4c0e1e allow dragging by the tab bar on macOS 2019-11-23 14:05:39 -08:00
Wez Furlong
349a24ccd9 allow dragging by tab bar on linux
This works with X11 on fedora, but the window movement is ignored
by the xwayland machinery on chromeos.
2019-11-23 11:46:03 -08:00
Wez Furlong
01eaa7db08 window: adopt Point for mouse coordinates
and allow them to be signed again
2019-11-23 08:48:09 -08:00
Wez Furlong
14fbf43485 promise: more properly implement Future::poll
The future won't ever complete if you don't connect the waker
from the context!

Prove this out by making the windowops functions async and
verifying them in the async example
2019-11-23 08:16:12 -08:00
Wez Furlong
152874dd23 window: fixup the async example for stable async 2019-11-23 08:16:12 -08:00
Wez Furlong
9d8e664ec0 tidy up the error output in the case that we fail with an error 2019-11-22 20:32:03 -08:00
Wez Furlong
4e1cfe01a8 linux: fix potentially busy loop
I introduced this issue with the recent rate limiting changes.  If we
generated sufficient events to fill the pipe buffer and trigger an
EAGAIN on the write side of the pipe, we'd end up in a state where epoll
would continually wake us up to deal with it, but because we gated
reading from the pipe on having entries in the queue we could decide
that there was nothing to do and leave the pipe unread.

This commit adjusts things so that we always try to read some data from
it.

This is OK because we're using the pipe to knock the main thread out of
a sleep rather than as the definitive count of events.
2019-11-22 14:06:17 -08:00
Wez Furlong
185e72b1fe simplify error logging in main 2019-11-22 10:55:48 -08:00
Wez Furlong
3057befa5d remove use of tinyfiledialogs
It will pass the message text to the shell without proper quoting
which results in it running all sorts of garbage depending on
the message you're trying to display.

Very scary!

refs: https://github.com/jdm/tinyfiledialogs-rs/issues/19
2019-11-22 08:48:33 -08:00
Wez Furlong
95900dc0a5 add some debug to SpawnQueue::has_any_queued
I'm seeing occasional 100% cpu usage on my linux system and I'm
not sure if its just because I'm running a stale binary.
I added this (commented out in this commit, but live on my local
system) debug print to help understand it.
2019-11-22 07:08:22 -08:00
Wez Furlong
5dfd03468b config: DRY; use serde defaults for Config 2019-11-22 06:50:39 -08:00
Wez Furlong
1737ca4d80 fix subtraction overflow when creating a new window when tab bar enabled 2019-11-22 04:51:55 +00:00
Wez Furlong
e9ec35713c raise ratelimit_output_bytes_per_second
10k was a bit tight for a full-screen vim window, so bump
it up a bit more.
2019-11-21 19:03:46 -08:00
Wez Furlong
3d7dbe9e76 fixup windows packaging CI
make this match the non-packaging CI config and ensure that it updates
the version of rust that is installed.
2019-11-21 18:58:59 -08:00
Wez Furlong
a5ece82d69 fix compilation on macos
refs: https://github.com/wez/wezterm/issues/65
2019-11-21 18:31:02 -08:00
Wez Furlong
6787512d62 avoid busy looping over the spawn queue
Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 18:20:59 -08:00
Wez Furlong
824ec691fe revise ratelimit_output_bytes_per_second default
I've found that 10_000/s strikes a reasonable balance between
output speed and the ability to interrupt the output.

Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 18:20:30 -08:00
Wez Furlong
06da330087 add low pri spawn queue
Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 18:20:17 -08:00
Wez Furlong
b3032f8a5a window: macos: yes starvation fix
Similar to b83a63126c, this helps
to avoid starving the gui events.

Refs: Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 17:34:01 -08:00
Wez Furlong
6461dc15f0 ci: nightly rust isn't installable and is broken
I can't install it locally either, so let's just turn it
off in the CI
2019-11-22 01:20:02 +00:00
Wez Furlong
b83a63126c fix a starvation issue on linux/x11 systems
The `SpawnQueue::run_impl` would loop until it had exhausted
all queued items.  This prevents returning to the main loop
and resulted in the UI hanging while eg: `yes` was running,
and could also block accepting keyboard input, which is
pretty bad.

In addition, the queue implementation could fill up a pipe
and block the write side while it held a lock, which in
turn would prevent the read side from making room for the
write to succeed!

This commit changes the behavior on linux to change the wakeup
behavior of the queue from having a 1:1 relationship between
enqueue:wakeup to n:m where n and m are both >= 1.  This is
sufficient to wake a sleeping gui thread.  The gui thread
can then pop and process a single item at a time, interleaved
with dispatching the gui events.

The result is a bit more responsive, however, there is no
backpressure from the gui to the read side, so if the read
side is eating 2MB/s of data and the GUI side is processing
less than this, then an interrupt signal may still take a
few seconds to take effect.

I have mixed feelings about adding backpressure, because
I'm not sure that it is worth actually rendering all of
the parsed output text when there is a lot of it.

I need to follow up and verify these changes on macOS
and Windows too.

Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 16:53:01 -08:00
Wez Furlong
a031b5b9eb improve the rate limiter
when over the budget, this reduces to a trickle of 1 byte per
appropriate sub-second interval.  For example, if the limit is
set to 100 bytes per second, we admit 1 byte every 10ms.

Refs: https://github.com/wez/wezterm/issues/65
Refs: https://github.com/wez/wezterm/pull/67
2019-11-21 14:42:33 -08:00
Wez Furlong
a26a94b5bb config: allow specifying NONE or "" for key modifiers
previously, we would raise an error for these, which made it
awkward to eg: bind just F1 to an action.
2019-11-21 10:25:14 -08:00