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

3964 Commits

Author SHA1 Message Date
Wez Furlong
eaddd72a2d docs: changelog for #950 2021-07-18 19:15:08 -07:00
Cédric Schieli
77261ac374 Allow styling of the whole new tab button 2021-07-18 19:11:12 -07:00
Wez Furlong
a2e882a7cb deps: cargo update, and a couple of dependabot suggestions 2021-07-18 19:10:46 -07:00
Wez Furlong
91b3c64568 config: update WSLENV to hold TERM related environment
refs: #230
refs: #936
2021-07-18 17:49:41 -07:00
Wez Furlong
adc0ff276f docs: show how to switch color schemes for dark/light mode changes
refs: #806
2021-07-18 15:28:04 -07:00
Wez Furlong
7cd3dcaee4 tidy up cwd vs. home dir on Windows
Looking at #900; the unconditional directory change on startup
is "bad" because it only happens on Windows.

This commit removes it and instead puts the logic into the pty
layer to match the unix behavior.

The behavior is:

* If the command specifies the cwd, use that.
* Otherwise, use the home directory
2021-07-18 14:57:33 -07:00
Wez Furlong
f050659543 window: implement get_appearance and AppearanceChanged on Windows
refs: #806
2021-07-18 14:17:05 -07:00
Wez Furlong
a697b30223 window: add xsettings support on X11 systems
This allows reading xsettings which contain information about
both the active theme as well as the DPI.

refs: #947
2021-07-18 12:54:52 -07:00
Wez Furlong
1f5b900f3d plumb appearance change event -> reload on macos
This commit causes a window-config-reloaded event to trigger
when the appearance (dark/light mode) is changed on macos.

It also arranges to propagate the window level config to newly
spawned panes and tabs, created both via the gui and via the
CLI/mux interface.

refs: https://github.com/wez/wezterm/issues/894
refs: https://github.com/wez/wezterm/issues/806
2021-07-18 00:01:53 -07:00
Wez Furlong
daaa3299d6 window: introduce interface for determining if dark mode is active
This is a baby step: it introduces the Appearance concept
and provides an accessor at the Connection level.

Only macos implements this at this time, and nothing else
makes use of it.

refs: https://github.com/wez/wezterm/issues/894
refs: https://github.com/wez/wezterm/issues/806
2021-07-17 23:08:08 -07:00
Wez Furlong
75eaaab6a1 Allow window config overrides to apply per-pane
This allows window-level config overrides to apply
to panes contained within the window.

For instance, this allows setting a window-level
color scheme.
2021-07-17 23:02:41 -07:00
nick black
9355da958a implement DA3 tertiary deviceattr
Add the third device attributes (DA3) query+reply,
eliminating "unknown/unspecified CSI" error. Like
XTerm, simply reply with zeroes as opposed to site
codes or unique IDs.
https://vt100.net/docs/vt510-rm/DA3.html
2021-07-17 20:47:41 -07:00
Rashil Gandhi
1d800c956b Listen for settings change event 2021-07-17 11:26:16 -07:00
Rashil Gandhi
4ad9f10f9f Remove hardcoded logic for titlebar color 2021-07-17 11:26:16 -07:00
Wez Furlong
88a2162823 docs for wayland window_frame config options
closes #761
2021-07-17 09:37:13 -07:00
Wez Furlong
37888657bf fix rendering issue in close confirmation dialog
Mentioned in #898, the hover effect didn't match mouse movement.
This was just a rendering issue in the confirmation overlay.
2021-07-17 09:13:48 -07:00
Wez Furlong
ce1a05d9bd window: add some trace logging
refs: #949
2021-07-17 08:37:04 -07:00
Wez Furlong
020c0991e4 cleanup: remove term::Clipboard::get_contents method
This dates back to long ago, and is never called.
Remove it, and cleanup some state associated with it.
2021-07-17 07:38:48 -07:00
Wez Furlong
f6a7df9678 ssh: avoid looping forever if the connection drops
I saw this in the stderr logs when the connection was offline:

```
 2021-07-17T01:54:28.036Z ERROR wezterm_ssh::session           > Failed to write data to channel: Failure while draining incoming flow. Now
what?
 2021-07-17T01:54:28.036Z ERROR wezterm_ssh::session           > Failed to write data to channel: Failure while draining incoming flow. Now
what?
 2021-07-17T01:54:28.142Z ERROR wezterm_ssh::session           > Failed to write data to channel: Failure while draining incoming flow. Now
what?
```

This commit propagates the error rather than logging and ignoring it.

In addition, remove a couple of sources of blocking or panicking
that are now unmasked by this.

Possibly the root cause of https://github.com/wez/wezterm/issues/857
2021-07-16 19:31:37 -07:00
Wez Furlong
fcd5512709 fix misclassification of mouse events
While looking at https://github.com/wez/wezterm/issues/945 I noticed
that mouse moves were being considered to be drag events even though
no mouse buttons were held down.
2021-07-15 22:25:35 -07:00
Wez Furlong
b4c4c85683 changing the active pane now passes the focus event to the terminal
Test scenario is:

* Create a split
* in each pane run: `printf "\e[?1004h" ; od -c`
* Focus the panes, focus another window, and focus the window again
* The I and O events appear in the panes when changing their focus.
* Previously, only the active pane would get focus events when the
  window focus changed.

refs: https://github.com/wez/wezterm/issues/941
2021-07-13 08:58:18 -07:00
Wez Furlong
ac5199c216 config: add bypass_mouse_reporting_modifiers option
This allows changing eg: SHIFT to ALT for bypassing mouse reporting.

refs: https://github.com/wez/wezterm/issues/911
2021-07-11 22:02:23 -07:00
nick black
d337677b8e
[terminfo] add smxx/rmxx, purge blink (#905)
* [terminfo] add smxx/rmxx, purge blink

Testing with WezTerm nightly indicates no blink support
available through the xterm \E[5m, and I didn't see any
support in the code -- purge it. smxx and rmxx, meanwhile,
have been added to indicate support for struck text.

* restore blink

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2021-07-11 21:36:56 -07:00
Wez Furlong
a7326f6c41 cargo update 2021-07-11 20:08:24 -07:00
Wez Furlong
5c4fb92b87 fixup wgpu example 2021-07-11 12:46:23 -07:00
Wez Furlong
1bb2f50eb7 fixup windows build 2021-07-11 09:50:50 -07:00
Wez Furlong
edee1335c1 mux: remove parsing bottleneck
Test scenario is `cat`ing the public domain wiki text data from
http://cs.fit.edu/~mmahoney/compression/enwik8.zip in the terminal;
that file is 96M in size.

`time cat ~/Downloads/enwik8.wiki`

Prior to this change, depending on the OS, the time to cat the file
could be several minutes.

Digging in, the bottleneck appears to be that there isn't sufficient
parallelism between the reader and the parser, which means that the
rate of reading data is constrained by how long it takes to parse
and render a frame.

This commit switches away from using a synchronized vecdeque to
effectively create a non-blocking pipe, to "simply" using a socketpair
with a larger buffer size.

We now do blocking pty read -> write to socketpair in the reader
thread, and then read socketpair -> parse in the other.

The key difference between before and after being that the pty read
can continue to read and accumulate data (with an upper bound, so
that CTRL-C is still responsive) while we're parsing and rendering
a frame.

This increases the throughput for this scenario, bringing it down
from ~3:30 to ~17 seconds on this Ryzen 2700X system.

refs: https://github.com/wez/wezterm/issues/927
2021-07-11 08:26:35 -07:00
Wez Furlong
be680955d7 scroll to bottom on paste
closes: https://github.com/wez/wezterm/issues/931
2021-07-10 22:04:43 -07:00
Wez Furlong
566243ade5 mux: add some metrics around reading from ptys 2021-07-10 21:06:54 -07:00
Wez Furlong
77c5acaaf5 fixup tests on macos 2021-07-10 19:01:20 -07:00
Wez Furlong
37ec16329e fixup tests + wayland bits 2021-07-10 18:07:16 -07:00
Wez Furlong
cc2b9507f8 fixup build on windows 2021-07-10 17:52:14 -07:00
Wez Furlong
6aa575d838 fixup build on macos 2021-07-10 17:42:05 -07:00
Wez Furlong
db6da81272 window: move away from async event queue
I added this originally thinking that it would make it easier to resolve
https://github.com/wez/wezterm/issues/695 and to integrate wgpu support,
but it's the cause of https://github.com/wez/wezterm/issues/922 so let's
take it out and more directly connect the window events to those in the
terminal.

This commit likely breaks mac and windows; pushing it so that I can
check it out and verify on those systems.
2021-07-10 17:30:19 -07:00
Wez Furlong
ad19b4f57b window: de-Future most of the WindowOps methods 2021-07-10 17:30:19 -07:00
Wez Furlong
4e99edf6f5 CellAttributes: split color into thin/fat components
The common palette indices are in the main cell attributes.
Using true color will allocate fat storage.

This allows reducing the Cell size from 32 -> 24 across the
implementation of storing 10 bpc color (it peaked at 40 in
the last couple of commits).
2021-07-10 15:42:15 -07:00
Wez Furlong
47839adf95 CellAttribute: move fg/bg color accesses to accesors
This facilitates hiding the raw fields in the next diff
2021-07-10 15:15:36 -07:00
Wez Furlong
1a673a5e5b RgbColor: store 10bpc
This makes Cell larger; will compensate in following diff
2021-07-10 15:06:32 -07:00
Wez Furlong
9c77d56026 RgbColor: hide internal red, green, blue fields
I'd like to adjust this to support 10bpc color, so the first step
is hiding the individual 8bpc fields.
2021-07-10 14:22:31 -07:00
Wez Furlong
0208e91cbd docs: changelog for https://github.com/wez/wezterm/issues/933
closes: https://github.com/wez/wezterm/issues/933
2021-07-10 08:22:41 -07:00
Wez Furlong
cd1f7b1784 x/wayland: remove Mod3 -> SUPER mapping
I'm not sure where this came from in its originating commit
(05a60e6e8b), but it is inconsistent with
the reverse mapping function added in that same commit:
05a60e6e8b/window/src/os/x11/xkeysyms.rs (L3)

It is causing problems in https://github.com/wez/wezterm/issues/933
and is rarely used by default, so it seems safe to just remove
this mapping.
2021-07-10 08:04:28 -07:00
Wez Furlong
313d130deb remove cluster from GlyphPosition
This simplifies the code and avoids a call to reverse the
cluster to the cell index.
2021-07-09 22:46:16 -07:00
Wez Furlong
fc4c165ca3 window: update wgpu -> 0.9
This is still used only in an example
2021-07-09 20:37:34 -07:00
Wez Furlong
91d6344180 weird dependency hack for mac+windows
Adding an edge from wezterm-ssh -> async_ossl causes the
openssl vendoring feature selection logic to trigger, which
in turn allows `cargo build -p window --examples` to succeed
again on macos.
2021-07-09 20:34:42 -07:00
Wez Furlong
70ec166076 shaper: micro-optimize some of the harfbuzz stuff
Probably not super effective compared to all the Vec stuff
going on in here, but it can't hurt.
2021-07-09 19:56:31 -07:00
Wez Furlong
2ed3cbe313 add per-line render latency histogram 2021-07-08 09:58:48 -07:00
Wez Furlong
7287447f33 refactor: hoist some params to higher render level
and pass down via params struct
2021-07-08 09:51:11 -07:00
Benoit de Chezelles
71ff0441c4 Rename cell_* to dot_area_* for clarity 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
313365771d micro-opti: Pre-calculate bit masks for braille dots pattern 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
6f64c747e8 Update changelog for braille 2021-07-08 09:30:27 -07:00