1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 03:09:06 +03:00
Commit Graph

6366 Commits

Author SHA1 Message Date
Wez Furlong
62ca174d19 termwiz: remove assertions
I don't think these are really necessary any more; the implementation
cannot go out of bounds, so the worst that can happen is that we
don't return any changes.

refs: https://github.com/wez/wezterm/issues/2222
2022-09-04 10:19:17 -07:00
Wez Furlong
1bb9a3fe81 docs: charselect and paneselect font & size config 2022-09-04 08:39:32 -07:00
Wez Furlong
ee436437b4 ci: expand auto-generated release description 2022-09-04 08:31:57 -07:00
Wez Furlong
c38816fc6e fontconfig: allow proportional fallbacks for codepoints
refs: https://github.com/wez/wezterm/discussions/2468#discussioncomment-3528085
2022-09-04 07:05:58 -07:00
Wez Furlong
821e833ad0 docs: changelog for 20220904-064125-9a6cee2b 2022-09-04 06:43:24 -07:00
liushuyu
9a6cee2b59 font: fix the function signature for log_buffer_message ...
... this will fix the build on non-x86 architectures
2022-09-04 06:41:25 -07:00
Wez Furlong
ecd7bc9842 docs: update for latest release 2022-09-03 20:54:27 -07:00
Wez Furlong
3bb1ed61b5 docs: pane:get_metadata
refs: https://github.com/wez/wezterm/issues/2460
2022-09-03 19:45:23 -07:00
Wez Furlong
587b0e50ff cargo update 2022-09-03 18:58:35 -07:00
Wez Furlong
9ad4f4ab5f docs: explain about ~ in default_cwd docs 2022-09-03 18:46:11 -07:00
Wez Furlong
cf40906b9a docs: refine CharSelect docs 2022-09-03 14:28:52 -07:00
Wez Furlong
a29d8ed4ae charselect: options to control copy behavior, + docs
refs: https://github.com/wez/wezterm/issues/2163
2022-09-03 13:58:50 -07:00
Wez Furlong
6471dcbc8a delete old record/replay scripts 2022-09-03 11:19:48 -07:00
Wez Furlong
0a3998887f correctly invalidate line shape data when fallback fonts load async
Ensure that the cache key changes when the shape generation changes
2022-09-03 09:31:08 -07:00
Wez Furlong
c4d19afa75 adventures in shaping
This commit is a result of debugging a problem with a particular font
where a VS2 variation of a glyph produced incorrect shaping.

Further investigation showed that this was specific to using freetype
font functions and that switching to opentype functions produces the
correct shaping information in that case.

Further-further investigation showed that this difference in behavior
was really due to the font file being out of spec and freetype returning
unexpected data as a result.

This commit allows switching to using harfbuzz's own opentype font+face
(rather than freetype) and/or switching the freetype-based font to using
opentype font functions.  These two options don't yield equivalent
results in the wezterm integration: a couple of our shaping tests
fail due to the x-advances not being the same. Those can be drastically
different in some cases (eg: I seem to get 0 for certain bitmap strikes,
and for Roboto the value is off by a factor of about 1.5).

This is incomplete and not something I want to turn on by default at
the moment, but I don't want to lose this work, hence this commit.

refs: https://github.com/wez/wezterm/issues/2475
refs: https://github.com/harfbuzz/harfbuzz/issues/3806
2022-09-03 08:34:19 -07:00
Wez Furlong
2af5a05d19 harfbuzz: allow creating an OT Face + Font
We've been using hb with freetype faces. This gives us the option
of using harfbuzz's own opentype based face and function set.

It doesn't change any behavior: this is just newly available code.

refs: https://github.com/wez/wezterm/issues/2475
2022-09-03 08:25:43 -07:00
Wez Furlong
53c6de956f harfbuzz: revise build and bindings
More recent versions of harfbuzz conveniently generate harfbuzz.cc
which has the full list of source files, so point our build to
that instead of chasing the evolving list of files: much easier!

Fixup some of the predefined symbols, and include opentype functions
in bindings.h so that we can pick those up in the bindgen output.
2022-09-03 08:20:53 -07:00
Wez Furlong
5f7738899b fix build on windows 2022-09-02 09:53:20 -07:00
Wez Furlong
804fc04630 deps: xkbcommon-rs released 0.5
can stop using my git repo for this
2022-09-02 09:25:20 -07:00
Wez Furlong
1b9ea2de3f change text cursor to fa_lock when entering passwords
There are caveats to determining this, but when we think
password entry is enabled, switch the cursor to the font-awesome
lock glyph instead of the normal cursor sprite.

fa_lock is used because it is monochrome and can thus be tinted
to the configured cursor color, and it respects blinking/easing.

refs: https://github.com/wez/wezterm/issues/2460
2022-09-02 09:00:28 -07:00
Wez Furlong
14c613a064 add Pane::get_metadata
The idea here is that different kinds of panes may want to expose
additional metadata to lua scripts. It would be a bit weird to add
a Pane method for each of those and plumb it all the way through
the various APIs, so just allowing a pane impl to return a dynamic
value (likely an Object) allows a bunch of flexibility.

This commit exposes the clientpane is_tardy boolean and the time
since the last data was recevied (since_last_response_ms) from
the mux client pane implementation: these are used to show the
tardiness indicator in the client pane.

Exposing this data enables the user to add that info to their
status bar if they wish.
2022-09-01 21:27:49 -07:00
Wez Furlong
8adc78b587 reset mouse cursor to arrow when mouse leaves the window
refs: https://github.com/wez/wezterm/issues/2471
2022-09-01 18:45:20 -07:00
Wez Furlong
ab2c368a3c docs: update default assignments 2022-09-01 08:41:36 -07:00
Wez Furlong
1aea0e0dfe update shell completion info 2022-09-01 08:39:11 -07:00
Wez Furlong
16bf00c63c charselect: add explicit recent category, show category in UI
The default behavior for charselect is to show the recent category
if you have previously used it, otherwise, show the default emotion
category.

refs: https://github.com/wez/wezterm/issues/2163
2022-09-01 07:19:17 -07:00
Wez Furlong
a599567423 cargo fmt 2022-09-01 06:54:27 -07:00
Wez Furlong
44ae864709 pty: fix build on windows 2022-09-01 06:02:16 -07:00
Wez Furlong
c0a841eecb pty: set SHELL to the shell we selected
refs: #2469
2022-09-01 05:37:51 -07:00
Wez Furlong
9082c79b34 pty: actually return the shell we found
this was masked for me because my dotfiles have a special case
to run zsh when launching sh as a login shell. doh!

refs: https://github.com/wez/wezterm/issues/2469
2022-09-01 05:24:05 -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
699d720a71 ssh: add trace logging when we send a signal 2022-08-31 20:40:06 -07:00
Wez Furlong
9721900b16 ssh: reduce some redundant logging around AcceptEnv
just show it once at warn level and drop it to debug after that.
2022-08-31 20:40:06 -07:00
Wez Furlong
ad9490ee8f posix: prefer to resolve shell via the password database
I've had a couple of people report issues like
https://github.com/wez/wezterm/issues/2378 recently, and we can avoid
this class of problem by unsetting SHELL at proces startup, so that's
what we do.
2022-08-31 20:40:06 -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
ba88bda9eb new color scheme: poimandres
refs: https://github.com/olivercederborg/poimandres-wezterm/issues/2
2022-08-30 18:02:14 -07:00
Wez Furlong
97eaa58112 codec: bump version
Something in the ABI changed recently, so we need to bump this
avoid weird repeated errors with the mux client
2022-08-30 09:43:32 -07:00
Wez Furlong
ccc1a2beff add pane_id and active state to render cache key
refs: https://github.com/wez/wezterm/issues/2467
2022-08-30 08:18:13 -07:00
Wez Furlong
fdb7c557e9 ssh: close stdout, stderr bridges if child is done and there is no data
Inspecting the wezterm process with `lsof -p`, before and after closing
a pane with `CloseCurrentPane`, the same number of unix domain sockets
are open, which is bad.

This commit tries a bit harder to clean things up: if we got a process
exit condition we now remember that we had it, and, while processing
the IO for that channel, if we have no data for stdout or stderr
(respectively) and the channel exited, we close our end of the
socketpair to encourage EOF to be detected on the other end.

This is sufficient to restore the number of open files to the same
number wezterm had opened prior to opening that pane.

@chipsenkbeil: this might possibly be a factor in the issue you
reported, but I haven't had time to really dig into that yet!

refs: https://github.com/wez/wezterm/issues/2466
refs: https://github.com/wez/wezterm/issues/2456
2022-08-30 08:00:49 -07:00
Wez Furlong
60c5eb1f51 add cursor shape/visibility to quad cache key
otherwise strangeness can occur in vim when vim hides the cursor
as part of partially updating the screen.
2022-08-30 07:28:13 -07:00
Wez Furlong
0974c631e2 mux: gracefully handle socketpair failure
Avoids panicking when the process runs out of resources, but doesn't
address the underlying resource issue.

refs: https://github.com/wez/wezterm/issues/2466
2022-08-30 07:11:30 -07:00
Wez Furlong
3fab3aaf21 mux: refactor emit_output_for_pane and use it for exit_behavior
The logic in the exit_behavior case was a bit smarter than that
in emit_output_for_pane, so adopt the former in the latter, then
use the latter for the former!
2022-08-30 07:10:32 -07:00
Wez Furlong
0d85d05442 update conpty to v1.14.2281.0 release 2022-08-29 08:32:08 -07:00
Wez Furlong
b9d0843b71 deps: tiny-skia 0.7 -> 0.8 2022-08-28 20:50:27 -07:00
Wez Furlong
0f0593f475 cargo update 2022-08-28 20:48:33 -07:00
Wez Furlong
9732f9ee2b Adjust render caching; switch to LFU caches from LRU 2022-08-28 10:28:26 -07:00
Wez Furlong
1398c0d4b0 add user-var-changed event 2022-08-27 17:22:21 -07:00
Wez Furlong
ca8d3f3fee improve error message in case wezterm-gui cannot be run
refs: https://github.com/wez/wezterm/issues/2457
2022-08-27 15:58:14 -07:00
Wez Furlong
3c7b75a4f3 fixup invalidation of blinking cursor, and on focus change 2022-08-27 12:14:10 -07:00
Wez Furlong
d38caf4088 cargo fmt 2022-08-27 10:32:01 -07:00
Wez Furlong
bf39e90676 track fps and recent frame duration for diagnostic purposes 2022-08-27 09:10:26 -07:00