1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00
Commit Graph

6797 Commits

Author SHA1 Message Date
Wouter Beeftink
1ccc6c9ce0 Convert admonition blocks to markdown equivalent
Note: the second block had no type specified. I picked `tip` for this one.
2023-03-19 07:25:26 -07:00
Wez Furlong
8e0f9947d2
fix time.call_after when used inside an event callback
```lua
local wezterm = require 'wezterm'

function user_callback_test(window, pane)
  print("user_callback_test()")
  wezterm.time.call_after(3, function()
    print("Hello again, later")
  end)
end

return {
  keys = {
    { mods = 'CTRL|ALT',
      key = 'u',
      action = wezterm.action_callback(user_callback_test)
    }
  }
}
```

refs: https://github.com/wez/wezterm/issues/3026
2023-03-19 07:22:14 -07:00
Wez Furlong
4d471807c3
mouse: don't over invalidate when hovering tabs
refs: #3276
2023-03-19 06:35:17 -07:00
Wez Furlong
c1e9bcba5f
fix non-serde termwiz build 2023-03-18 22:21:42 -07:00
Wez Furlong
4466997b88
clean up blob storage on shutdown
The static OnceCell didn't run destructors, so shift to something
where we can explicitly trigger them to run and clean up the
temporary directory area.
2023-03-18 22:19:46 -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
6c86bfba39
add wezterm-blob-leases crate 2023-03-18 20:30:47 -07:00
Wez Furlong
b27fd84e11
docs: fix video link on features page 2023-03-18 07:36:01 -07:00
Wez Furlong
2d255c2d75
fix kitty image protocol handling
Input data:

\e_Ga=T,f=32,s=10,v=22,c=1,r=1,m=1\e\\e_Gm=1;/xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T//P=\e\\e_Gm=1;/xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T////E////xP///8T//P=\e\\e_Gm=0\e\

There were two issues in handling this:

* We expected there to be `;payload` in the first transmission packet,
  but there wasn't one, so we ignored it as ill-formed.
* The standard base64 decoder in the rust ecosystem is super strict
  and rejects the "sloppy" python base64 encoder output that isn't
  strictly conformant with the RFC.  We need to jump through some
  hoops to get it to relax and accept the input.

refs: https://github.com/wez/wezterm/issues/2716
2023-03-17 15:39:01 -07:00
Wez Furlong
203bd10d8e
handle unsupported images better 2023-03-17 13:52:43 -07:00
Wez Furlong
01c7b30247
cargo update 2023-03-17 12:02:21 -07:00
winston
a394735fa9 fix: rewrite . when fetching path in lua plugin crate
Closes #3194
2023-03-17 11:57:30 -07:00
Wez Furlong
761bd5a4d4
docs: restore foo.html rather than foo/index.html style URLs 2023-03-17 11:47:59 -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
4e7eba36fb
Use mkdocs admonish for note about mux color schemes 2023-03-17 09:29:38 -07:00
Wez Furlong
587ceca98e
term: avoid breaking animated webp images when resizing
refs: https://github.com/wez/wezterm/issues/3258
2023-03-16 22:55:38 -07:00
Wez Furlong
97452d0ccc
term: improve readability of error message for oversized image
refs: https://github.com/wez/wezterm/issues/3264
2023-03-16 22:41:52 -07:00
Wez Furlong
a115fc0df7
fix iterm2 image cursor position
refs: https://github.com/wez/wezterm/issues/3266
2023-03-16 21:53:13 -07:00
Wez Furlong
6237668a14
pages: run only one at a time, allow them to queue up 2023-03-16 21:23:16 -07:00
Wez Furlong
6a9dfc409d
improve default hyperlink_rules. add default_hyperlink_rules()
refs: https://github.com/wez/wezterm/issues/928
2023-03-16 20:44:15 -07:00
Wez Furlong
c093b8861a
rustfmt 2023-03-16 18:13:30 -07:00
Wez Furlong
c2cf376d8f
fix DisableDefaultAssignment not working for CTRL|SHIFT P
refs: https://github.com/wez/wezterm/issues/3262
2023-03-16 18:08:37 -07:00
Wez Furlong
88e53a5f11
apply reloaded config to all panes, regardless of zoom state
refs: https://github.com/wez/wezterm/issues/3259
2023-03-16 09:31:32 -07:00
Wez Furlong
4576f46828
Set minimum animation frame duration to match max_fps
In #3260, the candidate animation had a frame delay of 1ms.  That is
problematic because there is no hope for wezterm running at 60fps (a
frame delay of ~16ms) to render that without dropping frames.

A consequence of such a short frame delay, coupled with the way that
images are carved up into cells, is that individual cells can easily
become visibled de-synchronized from their neighbors and results in what
looks like mpeg artifacts but are really regions where the cells are a
few frames ahead/behind their neighbors.

The solution is to clamp the frame duration up to match the minimum
displayable frame duration as governed by max_fps.

refs: https://github.com/wez/wezterm/issues/3260
2023-03-16 09:06:59 -07:00
Artyom Nesterenko
d84ccf126e Update Homebrew section 2023-03-16 08:02:46 -07:00
Yuta Katayama
6a012cfc9f docs: Correct to new URL 2023-03-16 08:00:28 -07:00
Jalil David Salamé Messina
cb9dc3a800 fix(clippy): Remove unnecessary clone/to_string calls 2023-03-16 07:40:12 -07:00
Wez Furlong
a22e6fa1ab
fix trigger paths! 2023-03-16 00:05:00 -07:00
Wez Furlong
4f48f03ab9
revise fmt workflow triggers 2023-03-15 23:43:32 -07:00
Wez Furlong
46913b7822
ci: adjust wezterm-ssh triggers 2023-03-15 23:43:32 -07:00
Wez Furlong
914ad42743
revise verify-pages triggers and workflow 2023-03-15 23:43:28 -07:00
Wez Furlong
cf74e7f501
ci: adjust termwiz workflow path triggers 2023-03-15 23:26:32 -07:00
Wez Furlong
f80376b9f6
docs: changelog for https://github.com/wez/wezterm/pull/3146 2023-03-15 23:16:14 -07:00
Jared Baur
2408367e6f Improve XDG configuration searching
In addition to XDG_CONFIG_HOME, use XDG_CONFIG_DIRS
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
to append paths for searching for configuration files.
2023-03-15 23:11:02 -07:00
Bilal Mahmoud
78e8d90e64 fix: typo about parameter 2023-03-15 22:58:59 -07:00
Wez Furlong
8489f7fd83
docs: make them build on macos again 2023-03-15 22:56:44 -07:00
Wez Furlong
5e5f816f83
add log_unknown_escape_sequences config option 2023-03-15 22:47:32 -07:00
Wez Furlong
cd89022164
docs: don't build now-unused mdbook bits 2023-03-15 21:35:27 -07:00
Wez Furlong
7b2330ead2
ci: workflow should run when its file is changed 2023-03-15 21:34:33 -07:00
Wez Furlong
cd6d7a9799
docs: disable instant page nav 2023-03-15 21:32:16 -07:00
Wez Furlong
532d9e6e85
ci: adjust path triggers 2023-03-15 21:31:46 -07:00
Wez Furlong
107bcf6a89
docs: some adjustments for mkdocs 2023-03-15 20:54:02 -07:00
Wez Furlong
4770b38737
docs: switch doc build to Material for MkDocs
It's a more mature and actively developed toolset for
technical writing, and looks nicer.
2023-03-15 19:22:51 -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
Jalil David Salamé Messina
c6dc38b7f3 fix(clippy): Derive Default where possible 2023-03-15 10:21:11 -07:00
Wez Furlong
fc656c03fe Apply suggestions from code review 2023-03-14 06:58:22 -07:00
Wez Furlong
0e193bf373 Update docs/shell-integration.md
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
2023-03-14 06:58:22 -07:00
Peter Wagner Sandoval Moreno
e3446316fd Add function for users powershell + starship
References:

Similar script for wt
https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory#powershell-with-posh-git
Custom pre-prompt in starship
https://starship.rs/advanced-config/#custom-pre-prompt-and-pre-execution-commands-in-powershell
2023-03-14 06:58:22 -07:00