Commit Graph
860 Commits
Author SHA1 Message Date
Wez Furlong b3f23bbf4a fixup some build and test warnings 2019-12-01 13:35:34 -08:00
Wez Furlong 901dc9c395 re-structure clipboard handling for mux
The wayland changes rendered clipboard handling for remote multiplexers
broken, and this commit makes it work again.

It removes the clipboard concept from the the TerminalHost and
keeps it separated as the term::Clipboard concept.

The muxer now has plumbing for passing the Clipboard to its idea
of Windows and Tabs and this is hooked up at window creation and
domain attach time.
2019-12-01 13:31:12 -08:00
Wez Furlong 7d510f4f7e reduce log verbosity for compute vertices 2019-12-01 11:43:22 -08:00
Wez Furlong 420903662d reduce verbosity for config reload messages 2019-12-01 11:40:55 -08:00
Wez Furlong dfe98f46f9 ssh: disable nagle 2019-12-01 11:25:04 -08:00
Wez Furlong 0edceea972 fix compilation on macos 2019-12-01 10:16:14 -08:00
Wez Furlong f15f556054 wayland: add config option to avoid using it
Just in case!
2019-12-01 07:56:41 -08:00
Wez Furlong 58cb696593 make pty size consistent with tab bar dimensions
This fixes up a series of "we're confused about the screen size"
messages that showed up on startup.
2019-11-30 23:22:37 -08:00
Wez Furlong 68f819e737 avoid resizing terminal tab when scaling changes 2019-11-30 22:03:57 -08:00
Wez Furlong 70f09ef1b4 fix window size calculation when scaling changes
I noticed that we were relatively undersized for newly created
windows; there were two problems:

1. We weren't propagating the old rows and cols counts through
   to the speculative resize.
2. The speculative resize wasn't implemented on wayland, and
   needs a surprising amout of work to actually make the resize
   take effect.
2019-11-30 21:27:03 -08:00
Wez Furlong ea61e8c57d wayland: don't allow clicks in titlebar to go to tabbar 2019-11-30 13:21:37 -08:00
Wez Furlong 4ef20480c5 wayland: implement clipboard
This was honestly a PITA because of its complexity.  The `clipboard`
crate (now dropped as a dep) didn't support wayland, so I looked at
the `smithay-clipboard` crate, which caused all of my input to become
laggy just by enabling it--even without actually copying or pasting!

Both of those crates try to hide a number of details of working with
the clipboard from the embedding application, but that works against
our window crate implementation, so I decided to integrate it into
the window crate using Futures so that the underlying IPC timing and
potential for the peer to flake out are not completely hidden.

This first commit removes the SystemClipboard type from wezterm
and instead bridges the window crate clipboard to the term crate
Clipboard concept.

The clipboard must be associated with a window in order to function
at all on Wayland, to we place the get/set operations in WindowOps.

This commit effectively breaks the keyboard on the other window
environments; will fix those up in follow on commits.
2019-11-29 12:17:52 -08:00
Wez Furlong 7b461c1580 software: don't fill the bottom two lines in bg color
Fix the math so that we correctly calculate the size of the the
marginal fill area at the bottom when in software rendering mode.
2019-11-28 07:16:46 -08:00
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 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 f3f61b47dc tab bar: add new tab button to tab bar 2019-11-23 14:57:17 -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 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 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 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 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 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
Wez Furlong ac028da1b6 fix an issue with rate limiting data from the child pty
We need to chunk the data that we read from the child otherwise
we may potentially try to admit more data in a single action
than the ratelimiter will ever allow (eg: if we read 4k of data
and the limit is 100 bytes per second, we can never send that
4k of data in a single write).

Our handling of that situation was not good: we'd panic and kill
the background thread that was reading the data, but the rest
of the app was still running.

This commit upgrades to the most recent rate limiter crate
and performs explicit chunking of the output so that we
behave more sanely.

Refs: https://github.com/wez/wezterm/issues/65
2019-11-21 08:36:16 -08:00
Wez Furlong 371e07838d tab bar: set mouse to arrow when in tab bar 2019-11-21 07:08:31 -08:00
Wez Furlong c6b62d8055 tab bar: default mouse coords outside of view
This helps to prevent a spurious hover styled tab caption being rendered
in some cases.
2019-11-21 00:11:51 -08:00