1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-30 14:49:26 +03:00
Commit Graph

3964 Commits

Author SHA1 Message Date
Benoit de Chezelles
f3b5365c85 Add test-data files for braille characters 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
Wez Furlong
4f29f2bc80 cargo update 2021-07-07 13:27:16 -07:00
Benoit de Chezelles
c03b6946f6 Add light line vs heavy line test data file 2021-07-07 13:26:23 -07:00
Benoit de Chezelles
a35aeca082 glyphs: Make heavy lines visibly heavy 2021-07-07 13:26:23 -07:00
Benoit de Chezelles
4f7b21d532 docs: Add note on issues with binding mouse Up event only 2021-07-04 09:53:57 -07:00
Wez Furlong
5b135a6e50 fix auto-complete-o 2021-07-04 09:43:34 -07:00
Wez Furlong
47fc6cac64 fixup build on linux 2021-07-04 09:30:16 -07:00
Wez Furlong
423b208780 font weight can now be specified as the underlying opentype weight
opentype allows a font to have a weight in the range 0-1000.
MacOS has its own concept of symbolic weight names and opentype
values that is a slightly different scale of boldness to Windows
and Linux.

That means that Medium could be a different range of opentype
weight values depending on the system.

To further complicate things, the font designer can name their
variant with any name they like and assign it an arbitrary
opentype weight value.

For the Operator Mono font, it has Book variant with opentype
weight 325 and a Light variant with an opentype weight of 300.

wezterm was considering these both to have `FontWeight::Light` because
that's how those values were bucketed, which results in amibiguity in
resolve the font and frustration in not being able to access one of the
variants.

This commit changes the `FontWeight` type to now hold the unambiguous
opentype weight value, and to define some symbolic aliases for
some specified weights.

When serializing, if the weight matches a symbolic alias, then that
name will be used in the canonical name (eg: as listed via ls-fonts).
Otherwise, the numeric value will be used.

When parsing the font configuration, wezterm will allow both symbolic
and numeric values.

This allows all of the Operator Mono variants to be referenced
unambiguously, although some variants have to be specified via the
numeric weight:

```
wezterm.font("Operator Mono", {weight=275, stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-XLight.otf, FontDirs
wezterm.font("Operator Mono", {weight="Light", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Light.otf, FontDirs
wezterm.font("Operator Mono", {weight=325, stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Book.otf, FontDirs
wezterm.font("Operator Mono", {weight="DemiLight", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Medium.otf, FontDirs
wezterm.font("Operator Mono", {weight="Regular", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Bold.otf, FontDirs
```

https://github.com/wez/wezterm/issues/849#issuecomment-873454483
2021-07-04 08:55:08 -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
ba42367fbf ssh: expand %u token 2021-06-30 13:32:55 -07:00
Wez Furlong
f43388c72d ssh: also read windows system ssh config file 2021-06-30 12:19:40 -07:00
Wez Furlong
d3deca60cd ssh-config: allow multiple IdentityFile lines in ssh config
The man page states:

> For each parameter, the first obtained value will be used.

but then later says:

> It is possible to have multiple identity files specified in
> configuration files; all these identities will be tried in sequence.
> Multiple IdentityFile directives will add to the list of identities
> tried (this behaviour differs from that of other configuration
> directives).

So that's what this commit does
2021-06-30 12:08:28 -07:00
Wez Furlong
c61ac590f8 docs: fixup markdown on the mouse binding page 2021-06-30 07:52:01 -07:00
Wez Furlong
e05ddb1737 fix force_reverse_video_cursor 2021-06-28 09:18:13 -07:00
Wez Furlong
5044fcb98b cargo update 2021-06-27 22:46:19 -07:00
Wez Furlong
8ecfdb618f wayland: disambiguate Event type 2021-06-27 16:23:03 -07:00
Wez Furlong
46476f2eec wayland: remove unused code
This stuff was added because the underlying types lacked Debug
and Send. They've since added those impls and we don't need this
layer.
2021-06-27 16:01:26 -07:00
Wez Furlong
37a57e8a41 wayland: refine event loop 2021-06-27 15:13:41 -07:00
Wez Furlong
0a00ffe98b wayland: fix key repeat
The main culprit was the calloop feature that is used by default
in the underlying SCTK crate.

This commit:

* Routes keyboard processing via the same keyboard mapping code
  that we use for X11
* Implements key repeats directly, and with awareness of elapsed
  time in case the repeat rate is quicker than the event dispatching
  quantum
* Disables the calloop feature of SCTK and let us do our own polling
  of the wayland connection.

Critically, key repeat is sticky and unpredictable while calloop is
enabled.

closes: #669
2021-06-27 14:29:03 -07:00
Wez Furlong
c514254138 wayland: use proportional font for title bar
allow specifying the font in the config file
2021-06-27 13:04:20 -07:00
Wez Furlong
ca8209b230 wayland: move frame color config to the config file
This simplifies it a bit and exposes the config via the config file;
the following options are possible, each one specifies a color

```lua
return {
  window_frame = {
    inactive_titlebar_bg = "",
    active_titlebar_bg = "",
    inactive_titlebar_fg = "",
    active_titlebar_fg = "",
    inactive_titlebar_border_bottom = "",
    active_titlebar_border_bottom = "",
    button_fg = "",
    button_bg = "",
    button_hover_fg = "",
    button_hover_bg = "",
  }
}
```

refs: https://github.com/wez/wezterm/issues/761
2021-06-27 12:33:56 -07:00
Wez Furlong
e0a6ba9404 docs: update for #906 2021-06-27 10:28:46 -07:00
adrian5
4377323a19 Remove duplicate colorscheme file 2021-06-27 09:57:56 -07:00
Wez Furlong
7f04c4601a window: fixup tests for font config changes 2021-06-26 22:58:42 -07:00
Wez Furlong
282c148bf6 wayland: render title with our font layer when doing CSD
This isn't perfect by any means:

* Should allow configuring a sans-serif font
* Emoji need to be scaled

but it allows us to upgrade SCTK without loosing the titlebar
or any control over client side decorations.
2021-06-26 22:58:42 -07:00
Wez Furlong
4f9532f9d8 window: plumb font config to underlying window impl 2021-06-26 22:58:42 -07:00
Wez Furlong
edbb446183 deps: cargo update 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
d04486f30a wayland: replace andrew with tiny_skia
This has the consequence of removing the title bar text when
client side decorations are in use.
2021-06-26 22:58:42 -07:00
Wez Furlong
d1177a29c2 wayland: update to SCTK 0.14 2021-06-26 22:58:42 -07:00
Wez Furlong
355b2f5b5a wayland: import ConceptFrame impl from SCTK
This has been removed in a later version, so pull it in ahead
of updating that dependency to verify that it builds.
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
e78bcfce2a add some test data files 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