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

384 Commits

Author SHA1 Message Date
Wez Furlong
a2e882a7cb deps: cargo update, and a couple of dependabot suggestions 2021-07-18 19:10:46 -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
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
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
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
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
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
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
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
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
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
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
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
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
249f9dfe29 Use squares instead of circles for braille dots (for simplicity & perf) 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
d48cf4e5ee Few micro-optimizations for performance 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
831f3a8b51 Make the braille dots smaller (and the code clearer!) 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
3d9e791b84 glyph: Add working braille custom glyphs 2021-07-08 09:30:24 -07:00
Wez Furlong
381a17d897 capture some more latency measurements in histograms 2021-07-08 08:54:10 -07:00
Wez Furlong
e4b2a5c55a cache style-derived data in the line render loop
Just a simple cache to avoid repeated computation for space-separated
runs of clusters with the same attributes.
2021-07-08 08:36:54 -07:00
Wez Furlong
33309d95ac refactor: extract cached_cluster_shape from line renderer 2021-07-08 07:56:01 -07:00
Wez Furlong
2c1b532281 avoid lookup after shape cache miss 2021-07-08 07:48:13 -07:00
Wez Furlong
d32c6fca23 refactor: extract resolve_fg_color_attr to module scope 2021-07-08 07:46:21 -07:00
Wez Furlong
33c87611dc remove use of cluster cell idx in ls-fonts 2021-07-08 07:25:35 -07:00
Wez Furlong
b08a6ab5ef instrument cache hit rates, fix duration histograms 2021-07-07 17:21:18 -07:00
Wez Furlong
aac2e78970 update http_req -> 0.8
0.8 doesn't seem to build with rusttls, but I don't think
we need that any more: we've been using vendored openssl on windows
and mac for some time.

closes: #924
refs: https://github.com/jayjamesjay/http_req/issues/48
2021-07-07 13:37:57 -07:00
Benoit de Chezelles
a35aeca082 glyphs: Make heavy lines visibly heavy 2021-07-07 13:26:23 -07:00
Wez Furlong
1b77cb3491 ls-fonts: report config file errors
Previously, if the config file had errors, ls-fonts would silently
continue with the default config, which was confusing.

Make a point of checking and reporting config file errors.
2021-07-04 08:55:08 -07:00
Benoit de Chezelles
305c64c7ab Move glyphs previews LHS, add missing descriptions 2021-07-04 07:33:41 -07:00
Benoit de Chezelles
0d355e4d72 glyph: Comment the actual char for easy visualization 2021-07-04 07:33:41 -07:00
Wez Furlong
e05ddb1737 fix force_reverse_video_cursor 2021-06-28 09:18:13 -07:00
Wez Furlong
4f9532f9d8 window: plumb font config to underlying window impl 2021-06-26 22:58:42 -07:00
Wez Furlong
e69869efa7 refactor deps so that window can depend on wezterm-font
I want to use this to render the font in the title bar
2021-06-26 22:58:42 -07:00
Wez Furlong
8ab025b7fc Allow building without wayland support
You can run `cargo build --release --no-default-features` to build
without wayland support.

This is useful for systems that do not have wayland (eg: the `slint`
distro).
2021-06-26 22:58:42 -07:00
Wez Furlong
2fc143e6dd click to focus window now focuses the pane under the mouse cursor
refs: https://github.com/wez/wezterm/issues/881
2021-06-26 15:24:17 -07:00
Wez Furlong
e786968578 adjust hinting for box drawing
This looks better at more sizes

refs: #584
2021-06-26 13:56:16 -07:00
Wez Furlong
b7f504b15e complete box drawing glyphs
refs: #584
2021-06-26 13:45:45 -07:00
Wez Furlong
24fbba66c2 even more box drawing glyphs 2021-06-26 12:28:11 -07:00
Wez Furlong
29f28885fa box drawing: cell arcs 2021-06-26 10:37:09 -07:00
Wez Furlong
4e7f73fab7 box drawing: half lines and mixed lines 2021-06-26 10:16:12 -07:00
Wez Furlong
08fb4eb858 more dashes, and the diagonals 2021-06-26 09:55:45 -07:00
Wez Furlong
0b5444ccfd always use own box glyphs for pane splits
This section of the code wasn't looking up the custom glyphs
and would always use the font.  We can make rendering a little
more efficient if we skip the font resolution for this case,
and the code is much simpler if we just use our own box drawing
glyphs, so that's what we're doing here.

refs: #584
2021-06-26 09:26:10 -07:00
Wez Furlong
843dd88bb5 improve box drawing rendering at smaller font sizes 2021-06-26 08:54:01 -07:00
Wez Furlong
4c0d789ac3 zeno -> tiny_skia
Mostly so that we can turn off anti-aliasing for smaller sizes,
but it also happens to be more complete anyway.
2021-06-25 22:55:42 -07:00
Wez Furlong
fad09eddda even more box drawing glyphs 2021-06-25 21:56:24 -07:00