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

131 Commits

Author SHA1 Message Date
Wez Furlong
bf07f6de0f
Revert "deps: update to wgpu 0.19"
This reverts commit b4c5dc746d.
This reverts commit 3214610f16.
This reverts commit 3ec1cfba73.
This reverts commit 47590bbedc.
This reverts commit ea88dca296.
This reverts commit c269230b74.
This reverts commit 1484e2a673.
This reverts commit 6fd45c1223.
This reverts commit 9acc2ae6c5.

refs: https://github.com/wez/wezterm/issues/4825
refs: https://github.com/wez/wezterm/issues/4826
2024-01-21 09:51:58 -07:00
Wez Furlong
ba85958a61
deps: update env-logger
Note that we are pinned on 0.10 for env-bootstrap, where we use it
only for its module filter parser.
2024-01-20 16:01:10 -07:00
Wez Furlong
9acc2ae6c5
deps: update to wgpu 0.19 2024-01-20 12:09:52 -07:00
dependabot[bot]
68d9cfc6ad build(deps): bump the all group with 6 updates
Bumps the all group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [k9](https://github.com/aaronabramov/k9) | `0.11.6` | `0.12.0` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.78` | `1.0.79` |
| [serde](https://github.com/serde-rs/serde) | `1.0.193` | `1.0.194` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.109` | `1.0.110` |
| [clap_complete](https://github.com/clap-rs/clap) | `4.4.5` | `4.4.6` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.53` | `1.0.56` |


Updates `k9` from 0.11.6 to 0.12.0
- [Commits](https://github.com/aaronabramov/k9/commits)

Updates `anyhow` from 1.0.78 to 1.0.79
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.78...1.0.79)

Updates `serde` from 1.0.193 to 1.0.194
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.193...v1.0.194)

Updates `serde_json` from 1.0.109 to 1.0.110
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.109...v1.0.110)

Updates `clap_complete` from 4.4.5 to 4.4.6
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.4.5...clap_complete-v4.4.6)

Updates `thiserror` from 1.0.53 to 1.0.56
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.53...1.0.56)

---
updated-dependencies:
- dependency-name: k9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 10:29:24 -07:00
Wez Furlong
3e01871876
deps: wgpu -> 0.18 2023-10-30 07:41:12 -07:00
Wez Furlong
453ff8dab5
deps: http_req -> 0.10 2023-10-29 18:28:13 -07:00
Wez Furlong
c75f20f21c
deps: ordered-float -> 4.1.0
closes: https://github.com/wez/wezterm/pull/4338
2023-09-28 14:39:22 -07:00
Wez Furlong
b904ed7677
breaking(ish): pane.get_current_working_dir now returns Url
Previously we'd return the Url string.  Now we provide a Url
object that provides access to the various elements of the Url.

This will cause slightly breakage for folks that were treating
it as a string in their status event handlers, for example.

The docs have been updated to show how to run with both this
new Url object and also continue to run on older versions of
wezterm.

They now also show how to manually percent decode the url
for older versions of wezterm.

refs: https://github.com/wez/wezterm/discussions/4157
refs: https://github.com/wez/wezterm/issues/4000
2023-08-25 06:59:09 -07:00
Wez Furlong
c7cc3e4d81
charselect: parallelize fuzzy matching
This gets the matching time down below 110+ms to around 70ms
in release mode, which may not sound like a huge amount, but 100ms
is on the cusp of perceivable latency, so getting below that is
desirable.
2023-08-22 20:22:09 -07:00
Wez Furlong
0499ab0430
mlua 0.9 is now stable; update 2023-08-17 09:26:47 -07:00
Wez Furlong
3e3df823e4
deps: update wgpu -> 0.17
Pick up my fix from https://github.com/gfx-rs/wgpu/pull/3924

closes: https://github.com/wez/wezterm/issues/3612
2023-07-22 08:00:59 -07:00
Wez Furlong
b7771feef6
imgcat: work better with tmux and conpty
Neither of these understand image protocols, and both are
an additional processing layer between the application and
wezterm.

This commit detects and wraps OSC sequences in tmux's passthru
sequence so that the data is passed on to wezterm rather than
elided from the data stream.

For image protocols in both tmux and conpty, work a little
smarter and explicitly move the cursor position to the same
location that wezterm would move it to.  That prevents the
display from being as mangled by tmux/conpty due to a diverging
understanding of the cursor position.

The logic isn't perfect, and can result in the x-coordinate
being incorrect, and this won't work with the new --position
argument either in its current state, without adding a lot
of complexity to deal with scrolling and relative and absolute
positioning handling.

To facilitate that, a new termwiz Terminal trait method has
been added to probe the terminal name, version, cell and pixel
dimensions. It's not pretty.

refs: https://github.com/wez/wezterm/issues/3624
refs: https://github.com/wez/wezterm/issues/3716
2023-07-15 22:13:19 -07:00
Wez Furlong
750f49f0ae
deps: upgrade mlua to 0.9.0-rc.1
refs: https://github.com/khvzak/mlua/issues/291
refs: #3849
2023-07-12 14:14:55 -07:00
Wez Furlong
f901dfbf68
deps: tiny-skia -> 0.11 2023-07-09 18:28:48 -07:00
Wez Furlong
c1f495099e
deps: fastrand -> 2.0 2023-06-19 10:44:21 -07:00
Wez Furlong
7e2b7ca84d
deps: update tiny-skia
closes: https://github.com/wez/wezterm/pull/3794
2023-05-28 20:18:00 -07:00
Wez Furlong
989bd6ce77
cargo update 2023-05-01 08:36:25 -07:00
Wez Furlong
26090da81e
deps: tiny-skia -> 0.9 2023-04-24 09:13:44 -07:00
Wez Furlong
d5eee1817a
deps: upgrade wgpu 0.15 -> 0.16 2023-04-19 21:48:13 -07:00
Wez Furlong
0a47f8ea76
remove transitive dep on time 0.1
chrono still is pulling this in for some reason. Super frustrating.

refs: https://github.com/chronotope/chrono/issues/602
2023-04-18 13:53:59 -07:00
Wez Furlong
1e688a5128
Add serial_ports config
This commit teaches the config about SerialDomains, and the mux
layer about constructing a SerialDomain, then changes the GUI
layer to use those pieces to set up `wezterm serial`.

A new `serial_ports` config is added, and the GUI layer knows how
to apply it to the set of domains in the mux.

The result of this is that you can now define a domain for each
serial port and spawn a serial connection into a new tab or window
in your running wezterm gui instance.
2023-03-29 19:05:13 -07:00
Wez Furlong
2e488d57c7
update terminfo to 0.8 2023-03-24 10:12:49 -07:00
Wez Furlong
f5ba73a1a2
add own open_url crate
The upstream open crate keeps making stuff async/blocking/not-working on
windows, so this is a step towards removing this dependency.

refs: https://github.com/wez/wezterm/issues/3288
2023-03-19 12:44:12 -07:00
Wez Furlong
344a41f944
use blob leases for decoded animation frames
This allows the decoder thread to live only long enough
to decode the full set of frames; we can then store the
leases in memory and pull them in only when there is
a cache miss.

refs: https://github.com/wez/wezterm/issues/3263
2023-03-18 21:55:57 -07:00
Wez Furlong
7cd0cc21bf
ImageDataType::File -> EncodedLease
Adopt the new blob lease layer to storing and referencing
image files.

This reduces the number of open files needed when
images are being displayed in the terminal.

refs: https://github.com/wez/wezterm/issues/3263
2023-03-18 20:32:49 -07:00
Wez Furlong
e090eb9eae
Image decoding is now done in a bg thread
Continuing from the previous commit, this shifts:

* In-memory data -> temporary file
* Image decoding -> background thread

The background thread asynchronously decodes frames and
sends them to the render thread via a bounded channel.

While decoding frames, it writes them, uncompressed, to
a scratch file so that when the animation loops, it is
a very cheap operation to rewind and pull that data
from the file, without having to burn CPU to re-decode
the data from the start.

Memory usage is bounded to 4 uncompressed frames while
decoding, then 3 uncompressed frames (triple buffered)
while looping over the rest.

However, disk usage is N uncompressed frames.

refs: https://github.com/wez/wezterm/issues/3263
2023-03-17 11:41:20 -07:00
Wez Furlong
aa929a1a9b
move animation decoding from term layer to gui layer
This makes decoding animation frames a lazy operation, but it
comes at the cost of needing to re-decode the image from scratch
when it loops, because the image crate doesn't provide a way
to rewind its frame iterator.

That initial decode can have a significant time cost; a small
webp file consistently takes 150ms to decode, which is too
much to do inline in the render thread.

Next steps will be to move that cost off the render thread.
2023-03-17 11:41:20 -07:00
Wez Furlong
2bfb29f1be
improve handling of animated webp images
Use mainline image crate to avoid an otherwise unavoidable panic
in the upstream: https://github.com/image-rs/image/issues/1775

Explicitly operate on the frames from the animation.

refs: https://github.com/wez/wezterm/issues/3250
2023-03-15 11:34:47 -07:00
Wez Furlong
4b2973a9d4
deps: open -> 4.0 2023-03-12 20:37:58 -07:00
Wez Furlong
74dc74b7c8
deps: wgpu -> 0.15
This might help with https://github.com/wez/wezterm/issues/3032
2023-02-06 07:19:31 -07:00
Wez Furlong
d336c8a61e
deps: http_req -> 0.9 2023-02-05 07:38:55 -07:00
Wez Furlong
787f6550b8
macos: link to helpful resources from Help menu 2022-12-21 00:31:58 -07:00
Wez Furlong
eb8dfd32b3
macos: use interactive shell for .command scripts
This is primarily so that the user's environment is set up prior
to invoking the script.

refs: #2871
2022-12-20 08:30:07 -07:00
Wez Furlong
6e06b9af02
mux: Pane is now required to be Send+Sync. Use Arc<dyn Pane> 2022-12-19 11:52:33 -07:00
Wez Furlong
9923ae20b5
env_logger -> 0.10
closes: https://github.com/wez/wezterm/pull/2803
2022-11-27 21:37:25 -07:00
Wez Furlong
8479be7465
Basic useless wgpu based rendering foundation 2022-11-18 10:03:49 -07:00
Wez Furlong
173e27d2e8
Add support for heap profiling using dhat
refs: https://github.com/wez/wezterm/issues/2626
2022-11-14 13:26:02 -07:00
Wez Furlong
72757b8849
refactor: move lfucache into its own crate 2022-11-14 07:35:37 -07:00
Wez Furlong
43f2265ef1 deps: textwrap -> 0.16
closes: https://github.com/wez/wezterm/pull/2664
2022-10-23 20:50:47 -07:00
Wez Furlong
b1faba9d8a deps: upgrade finl_unicode to 1.2 2022-10-23 12:07:00 -07:00
Wez Furlong
35ce2fe74d trim heap usage
I spent a few hours in heap profilers.  What I found was:

* Inefficient use of heap when building up runs of
  `Action::Print(char)`.
    -> Solve by adding `Action::PrintString(String)`
  and accumulating utf8 bytes rather than u32 codepoints.
* Inefficient use of heap when building Quad buffers: the default
  exponential growth of `Vec` tended to waste 40%-75% of the allocated
  capacity, and since we could keep ~1024 of these in cache, there's
  a lot of potential for waste.
   -> Solve by bounding the growth to 64 at a time.  This has similar
   characteristics to exponential growth at the default 80x24 terminal
   size.  May need to add a config option for this step size for users
   with very large terminals.
* Lazy eviction from the LFU caches. The underlying cache advisor is
  somewhat probabilistic and has a minimum cache size of 256, making
  it difficult to maintain low heap utilization.
   -> Solve by replacing it with a very simple LFU algorithm. It doesn't
   seem to hurt much at the default terminal size with the default
   cache sizes.  If we make the cache sizes smaller, its overhead is
   reduced.

Some further experimentation is needed to adjust defaults, but this
should help reduce heap usage.

refs: https://github.com/wez/wezterm/issues/2626
2022-10-22 17:10:36 -07:00
Wez Furlong
2cae10016f deps: update emojis crate 2022-10-04 09:00:18 -07:00
Wez Furlong
a050849695 deps: update to clap 4
Deal with some breaking changes
2022-10-04 08:55:31 -07:00
Wez Furlong
85db555b37 deps: update finl_unicode 2022-09-16 07:47:33 -07:00
Wez Furlong
10cd78a81a fonts: remove last resort font
I was going to upgrade to the unicode 15 font, but in testing this I
decided that the logic is slightly complex and the glyphs are often
difficult to see at most terminal font sizes, which generates questions
from users, so just fall back to notdef.
2022-09-15 08:23:58 -07:00
Wez Furlong
96c4e7e9b9 Switch to finl_unicode for grapheme clustering
According to its benchmarks, it's almost 2x faster than
unicode_segmentation.  It doesn't appear to make a visible
difference to `time cat bigfile`, but I'll take anything
that gives more headroom for such little effort of switching.
2022-09-10 07:15:49 -07:00
Wez Furlong
ad35b9dc21 Add compile time features to allow building without vendored fonts
closes: #2305
2022-09-09 08:53:39 -07:00
Wez Furlong
7670c4f0ae char selector: track recently selected emoji and use frecency to show it
refs: https://github.com/wez/wezterm/issues/2163
2022-08-31 22:56:58 -07:00
Wez Furlong
ed731a0d8d Add CharSelect modal for emoji/nerdfont/unicode input
CTRL-SHIFT-U is a new default key assignment for this new modal.
It opens up a fuzzy searchable browser that defaults to showing
emoji/emoticons.  The category can by cycled through the suggested
emoji categories using CTRL-r.  Unlike the system emoji palette,
wezterm includes a category for nerdfont symbols, and another
that is a list of all unicode codepoint names, so you should be
able to browse for pretty much any codepoint you can think of.

The modal also allows fuzzy searching based on:

* The official unicode name
* The github shortcode
* codepoint value in hex

so if you know the codepoint value but not the name, you can
still find a way to input what you're looking for.

Pressing Enter will copy the selected item to the clipboard
send it to the active pane, and cancel the modal. You can therefore
repeat the insert by simply pasting.

I plan to add frecency to this in a later commit: that way the
frequently/recently used selections will show in a category of
their own and make it easier to re-input them.

refs: https://github.com/wez/wezterm/issues/2163
2022-08-31 18:15:28 -07:00
Wez Furlong
b9d0843b71 deps: tiny-skia 0.7 -> 0.8 2022-08-28 20:50:27 -07:00