1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 22:33:52 +03:00
Commit Graph

7112 Commits

Author SHA1 Message Date
Wez Furlong
7d66bc761d
termwiz::Modifiers is now wezterm_input_types::Modifiers 2023-04-13 14:18:13 -07:00
Wez Furlong
9f9e330dcd
cargo update 2023-04-13 10:10:24 -07:00
Wez Furlong
9b1321fac1
try again with squashing out caps+numlock
refs: https://github.com/wez/wezterm/issues/3514
2023-04-13 09:01:50 -07:00
Wez Furlong
0abc28dae0
fix numlock and capslock interfering with mouse assignments
refs: https://github.com/wez/wezterm/issues/3514

follow up from eaab3d08ae
2023-04-13 07:41:27 -07:00
Wez Furlong
c8b8e81171
rustfmt 2023-04-11 22:16:43 -07:00
Wez Furlong
88cc82d294
docs: changelog for #3497 #3466 #837 2023-04-11 22:14:18 -07:00
Peter Collingbourne
119036ab2a Do not wait indefinitely when being drip fed input.
If the client program is drip feeding us input at a rate faster than 1
character per mux_output_parser_coalesce_delay_ms (e.g. it is printing
output read from a serial port faster than this), we would previously
wait indefinitely for new input, because we would always poll with a new
timeout [...]delay_ms in the future. In the worst case, this would create
a busy loop that starves the other panes of an opportunity to read from
their ptys, making all of them unresponsive. Address this by making a
note of when the first character was read, and do not wait longer than
[...]delay_ms after this time.

Fixes #3466.
2023-04-11 22:04:06 -07:00
Wez Furlong
b5c7374f4b
docs: fix typo 2023-04-11 08:38:01 -07:00
Netboy3
c0accafe95 docs: add section regarding ssh_domains auto-populate and its use 2023-04-10 20:52:48 -07:00
Wez Furlong
fa0f538d36
mux: detect dead ssh session and reconnect
The issue was that the session was rendered dead/unusable by closing
all of the tabs.

We now detect this and create a new session.

refs: https://github.com/wez/wezterm/discussions/3480#discussioncomment-5567569
2023-04-10 20:47:17 -07:00
Wez Furlong
947d242fda
mux: improve error messaging
https://github.com/wez/wezterm/discussions/3480#discussioncomment-5567569
mentioned that running `wezterm cli spawn --domain-name SSH:foo`,
closing that tab and running `wezterm cli spawn --domain-name SSH:foo`
again failed.

The error message had no useful context.

This commit adds more context.
2023-04-10 20:14:58 -07:00
Wez Furlong
03d2df04ce
kitty keeb: support report associated text
refs: #3484
2023-04-10 16:52:54 -07:00
Wez Furlong
5311bb657e
macos: populate caps lock state, report num lock presses
macos doesn't have a num lock concept, so there is no num lock state
reported in modifiers. wezterm doesn't emulate that state because it
cannot guarantee to observe all key presses and correctly track it.
2023-04-10 16:38:53 -07:00
Wez Furlong
aa3f486a91
kitty keeb: see through num pad mappings
Always look through to the physical keys when processing the numpad.

refs: #3478
2023-04-10 10:45:17 -07:00
Wez Furlong
eaab3d08ae
x11/wayland: unbreak key bindings when capslock or numlock are active
Treat these similarly to positional key modifiers, but handle them
centrally to avoid broader issues with eg: interpreting ESC in
the command palette.
2023-04-10 10:04:19 -07:00
Asher
b0ceebbc2d Update format-tab-title.md 2023-04-10 09:12:56 -07:00
Erich Gubler
a58baacdef feat: add nu.exe to default skip_close_confirmation_for_processes_named
It's obvious that Nushell is intended to be skipped by default for close
confirmation. However, on Windows, Nushell instances are named `nu.exe`,
not `nu`, so they don't get skip-closed properly. Add `nu.exe` alongside
`nu`, so Windows behaves as expected.
2023-04-10 09:11:42 -07:00
Ron Waldon-Howe
0eeca6c2c5
fix(wayland): register frame callback then commit (fixes #3468) (#3485)
fix(wayland): register frame callback then commit (fixes #3468)

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2023-04-10 09:10:38 -07:00
Wez Furlong
e241ea58be
kitty keeb: move encoding logic to wezterm-input-types
We need access to the underlying raw/physical key in order
to correctly encode in some modes, so we need the full KeyEvent
struct for that.

Move the encoder up so it sits alongside the win32 input mode
encoder.

This should give us better results for both shifted/unshifted
and the "base layout" (US english) representations of a number
of keys.

Note that this is still not 100% technically correct: the unshifted
keys require knowledge of the keyboard layout that we don't have
at this OS-independent layer.

Right now we're assuming a US layout to unshift punctuation, which
is not right if you're not using that layout.  To resolve that,
more work is needed on each OS to be able to extract that information
and then to store it in the KeyEvent.

refs: https://github.com/wez/wezterm/issues/3479
refs: https://github.com/wez/wezterm/issues/2546
2023-04-10 08:54:03 -07:00
Wez Furlong
54a65a5401
kitty keeb: adjust legacy encoding logic
Just consider all ascii alphanumeric and punctuation as legacy
so that we don't decide to encode those as escapes when not required.

refs: #3315
2023-04-09 21:53:46 -07:00
Wez Furlong
70a8af479d
cargo update 2023-04-09 21:46:12 -07:00
Wez Furlong
a9165ae4c4
kitty keeb: fixup tests
refs: #3315
2023-04-09 13:22:25 -07:00
Wez Furlong
b704ec6d70
kitty keyboard: improve mode 1 support
We don't need to encode as many keys in mode 1.

refs: #3315
2023-04-09 13:05:23 -07:00
Wez Furlong
f4995511e2
keyboard: improve support for numpad buttons
We were missing encoding of these for the base xterm encoding
(I haven't daily driven a keyboard with a numpad in over 10 years!).

Improve mapping for the kitty protocol.

refs: https://github.com/wez/wezterm/issues/3478
2023-04-09 12:28:30 -07:00
Wez Furlong
b646c36e34
refactor: tidy up some logging 2023-04-09 12:26:32 -07:00
Wez Furlong
2dcf7ad98d
keyboard: plumb more modifier+state information through
This commit teaches the termwiz layer about positional modifiers,
and expands our modifier concept to also pass through led states
such as caps lock and num lock.

Those aren't actually keyboard modifiers, but the state is useful
to recognize.

Adjust the shift key normalization so that we don't uppercase
alpha characters when both SHIFT and CAPS_LOCK are held.
This processing will remove both SHIFT and CAPS_LOCK in that
situation.

Add a method to KeyEvent that will undo the OS keyboard layer
normalization of positional to generic modifier key presses.
eg: the OS may map LeftControl -> Control, but we actually
prefer to have LeftControl so if we can unambiguously reverse
that mapping, we do so.

refs: #3476
refs: #3475
2023-04-09 10:34:53 -07:00
Wez Furlong
397593be5c
kitty keeb: fixup shifted character encoding
refs: https://github.com/wez/wezterm/issues/3474
2023-04-08 20:01:10 -07:00
Wez Furlong
0540301121
kitty keeb: add test case for #2546
This passes, so I'm assuming that one of the other kitty
commits from today has resolved this.

refs: https://github.com/wez/wezterm/issues/2546
2023-04-08 19:28:22 -07:00
Wez Furlong
8bb39bd6f3
fixup kitty keyup events for alphabetical keys
refs: https://github.com/wez/wezterm/issues/3220
2023-04-08 19:19:27 -07:00
Wez Furlong
d239e65e64
fixup kitty keyboard encoding for F1-F4
refs: https://github.com/wez/wezterm/issues/3473
2023-04-08 18:19:07 -07:00
Wez Furlong
94359d2972
build: fix some log spew on macos
```
warning: voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
warning:                      ^
warning: zlib/zutil.c:315:20: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
```
2023-04-08 17:03:03 -07:00
Wez Furlong
5e5989f3e2
build: revise dep graph for version changes
Previously, the config crate would get rebuilt each time the
git state changed, which has a lot of fan out and makes the build
take longer than it really needs to.

This commit breaks out the version changing stuff to its own crate
and then provides a runtime mechanism for assigning the version
information back into the config crate.

The env-bootstrap crate is responsible for setting that up.
2023-04-08 17:03:03 -07:00
Wez Furlong
4667a4b4be
ratelimit: remove indirect dep on quanta
refs: https://github.com/wez/wezterm/issues/3472
2023-04-08 15:47:34 -07:00
Wez Furlong
b9b0f36692
fix OS keymapping issue with modals
Need to defer to the second pass (when we have mapped from physical
keys) before we route the key event to the modal.

refs: https://github.com/wez/wezterm/issues/3470
2023-04-08 15:31:48 -07:00
Wez Furlong
f535c5bdc0
docs: update for 20230408-112425-69ae8472 release 2023-04-08 15:01:26 -07:00
Wez Furlong
69ae847273
windows: fix: mess up full screen mode on config reload
refs: https://github.com/wez/wezterm/issues/3439
2023-04-08 11:24:25 -07:00
Wez Furlong
5fb6db8774
pty: fix unused import warning on windows 2023-04-08 11:13:12 -07:00
Wez Furlong
9e03d24402
windows: fix warning; mut not required here 2023-04-08 11:12:38 -07:00
Wez Furlong
62256c80b4
config: defer evaluating default wsl domains
The stack trace in https://github.com/wez/wezterm/issues/3425
shows a recursive borrow triggered indirectly by spawning
a subprocess and having that trigger the wndproc.

This commit doesn't really fix the recursive problem, but may
sidestep it, and it's probably best to avoid always running
the `wsl` command to get this list anyway, similar to the
change in 25255d90d6

refs: https://github.com/wez/wezterm/issues/3425
2023-04-08 08:51:47 -07:00
Wez Furlong
436847665d
docs: update for wezterm replay changes
refs: #3446
2023-04-08 08:35:14 -07:00
Wez Furlong
b4c8f7c01f
docs: explain what font shaping actually is 2023-04-08 07:52:55 -07:00
Wez Furlong
84f7fb9f3b
docs: add tags to a number of pages 2023-04-08 07:48:40 -07:00
Wez Furlong
36d5307b80
wayland: fix webgpu invalidation issue
For whatever reason, it appears as though the wayland
frame event stuff is unreliable when used with webgpu,
so we simply avoid using it.

refs: https://github.com/wez/wezterm/issues/3126
2023-04-07 22:15:07 -07:00
Wez Furlong
6bd3664d3d
wezterm replay: add --explain-only and --cat options
refs: https://github.com/wez/wezterm/issues/3446
2023-04-07 18:19:47 -07:00
Wez Furlong
7b40f01054
switch to fancy-regex crate
Enables back references and look around assertions for quick select
and hyper link rules

refs: https://github.com/wez/wezterm/issues/3247
2023-04-07 17:39:00 -07:00
Wez Furlong
b0d0e4c1be
docs: for integrated title buttons
refs: https://github.com/wez/wezterm/pull/2722
refs: https://github.com/wez/wezterm/issues/1180
2023-04-07 13:10:45 -07:00
Wez Furlong
56ae2fe276
Push folks towards the bug report template
by disabling the blank issue template
2023-04-07 11:50:58 -07:00
Wez Furlong
cbbe0da9d7
schemes: fix origin url when importing toml files 2023-04-07 10:48:19 -07:00
Wez Furlong
0a0c939c6f
add more color schemes
Primarily those from https://codeberg.org/anhsirk0/wezterm-themes
but also updated the others
2023-04-07 10:43:32 -07:00
Wez Furlong
da5ec63b26
docs: update color scheme versions
forgot to do this as part of a prior release
2023-04-07 10:41:53 -07:00