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

700 Commits

Author SHA1 Message Date
Wez Furlong
3c06b99675 charselect: improve compatibility with QMK unicode inputs
refs: https://github.com/wez/wezterm/issues/2581
2022-10-11 10:57:56 -07:00
Wez Furlong
4d598eb1ad mux: fix stale local/remote window id mapping in mux client
When closing the all mux tabs in a window, the remote will close
the window. If the local has a mixture of local and remote tabs
then subsequent attempts to spawn a tab in that window would
fail due to reusing the stale remote window id.

This commit purges the local/remote mappings that are (probably)
dead when the remote indicates that a pane has been removed.

The mapping should be re-established as needed later on.

refs: https://github.com/wez/wezterm/issues/2614
2022-10-11 08:03:57 -07:00
Wez Furlong
de466cfa64 config: validate consistency of domain names
refs: https://github.com/wez/wezterm/issues/2618
2022-10-11 06:59:12 -07:00
Wez Furlong
ed63d728bf term: support utf8 mouse reporting (DECSET 1005) 2022-10-10 23:06:40 -07:00
Wez Furlong
f0e3512629 docs: changelog for https://github.com/wez/wezterm/issues/2559 2022-10-08 16:02:23 -07:00
Wez Furlong
4e5945c061 Add ResetTerminal and pane:inject_output method
refs: https://github.com/wez/wezterm/discussions/2606
2022-10-08 10:25:22 -07:00
Wez Furlong
473316934b add window-focus-changed event 2022-10-08 09:45:57 -07:00
Wez Furlong
fa4fced599 validate the config to prevent div by 0 for initial_cols/initial_rows
refs: https://github.com/wez/wezterm/issues/2593
2022-10-07 09:04:37 -07:00
Wez Furlong
1a4749940b fix charselect panic when pressing enter on no matches
refs: https://github.com/wez/wezterm/issues/2580
2022-10-04 09:09:47 -07:00
Wez Furlong
47a15153b9 rename normalize_to_nfc to normalize_output_to_unicode_nfc
Makes it a bit more verbose, but also a bit clearer what it does.

refs: #2482
2022-09-24 19:41:37 -07:00
Wez Furlong
61752504dd use iter_panes_ignoring zoom in more places in the mux
`iter_panes` returns the renderable set of panes, but most functions
in the mux want to operate on the full set of panes.

Notably, when closing a tab, we were not killing panes other than
the zoomed pane, which caused wezterm to linger in the background.

refs: https://github.com/wez/wezterm/issues/2548
2022-09-23 16:44:03 -07:00
Wez Furlong
8e7a2cce79 overlays: pass down window config and apply overrides
refs: https://github.com/wez/wezterm/issues/2544
2022-09-23 05:00:31 -07:00
Wez Furlong
a0afe9c5ae mux: disable the lag indicator by default
I'd like to push that into the status bar, so nudge people towards
that in the docs for this.

There is a config option to restore it. I'd like to ultimately
remove that though.

refs: https://github.com/wez/wezterm/discussions/2542
2022-09-22 06:46:56 -07:00
Wez Furlong
694ffdbed2 macos: revise how we prevent routing to the IME
https://github.com/wez/wezterm/pull/2435 proposed including
CTRL-modified keys, but I think that the state of the code now means
that we can simplify that area and adjust it so that we will default to
routing keys to the IME, but excluding them based on the
`send_composed_key_when_(left|right)_alt_is_pressed` configuration.

I've only very lightly tested this, but it seems ok with roman text and
me punching in random pinyin and then using CTRL-H or CTRL-M to delete
or enter.

refs: https://github.com/wez/wezterm/pull/2435
2022-09-21 21:22:38 -07:00
Wez Furlong
dc9fb118ec deps: harfbuzz -> 5.2.0 2022-09-21 21:13:01 -07:00
Wez Furlong
9a7aad0200 add window:is_focused() method
refs: https://github.com/wez/wezterm/discussions/2537
2022-09-21 19:44:44 -07:00
Wez Furlong
f898c15c9b changelog: mention recent work to trim things down 2022-09-21 19:14:13 -07:00
Wez Furlong
182b6d148c docs for modifyOtherKeys
refs: https://github.com/wez/wezterm/issues/2527
2022-09-20 09:11:52 -07:00
Wez Furlong
da13cf69fa docs for activate-pane-direction
* Enhance usage info in `wezterm cli activate-pane-direction --help` by
  showing the variants.
* Update shell completions
* docs and changelog entry
2022-09-20 08:50:46 -07:00
Wez Furlong
cd9376d923 tab:panes() and tab:panes_with_info() now return all panes
and not just the zoomed pane if a pane is zoomed
2022-09-20 08:10:06 -07:00
Wez Furlong
1b99690990 Add superscript and subscript cell attributes
I've expanded the number of bits from 16->32 without impacting
the overall struct sizes and reserved 2 bits for super/subscript.
I refer to these as vertical alignment properties for conceptual
consistency with css.

SGR 73, 74, 75 are used to set super, sub and normal vertical alignment.
These are compatible with mintty.

However, mintty just added support for setting both attributes to render in
small caps in 06ac446049
(https://github.com/mintty/mintty/issues/1171)
2022-09-19 06:42:14 -07:00
Wez Furlong
006e19813f x11: use _NET_WM_MOVERESIZE to drag by tab bar
refs: https://github.com/wez/wezterm/issues/2530
2022-09-18 17:20:41 -07:00
Wez Furlong
5a754e44e7 avoid panic when attempting to search the launcher menu
refs: https://github.com/wez/wezterm/issues/2529
2022-09-18 13:06:29 -07:00
Wez Furlong
47f4987687 Add preliminary support for xterm's modifyOtherKeys encoding
see: https://invisible-island.net/xterm/modified-keys.html

I wouldn't be surprised if I've missed some cases, but this seems
to work for the keys mentioned in this issue:

refs: https://github.com/wez/wezterm/issues/2527
2022-09-18 08:26:08 -07:00
Wez Furlong
8fd2dd8146 fonts: update Symbols Nerd Font Mono
This is "NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete Mono.ttf" from
https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.2.2
2022-09-17 06:12:29 -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
295677ed52 config: cursor_thickness, strikethrough_position, underline_position, underline_thickness
refs: https://github.com/wez/wezterm/issues/2326
refs: https://github.com/wez/wezterm/issues/2505
2022-09-10 18:34:35 -07:00
Wez Furlong
598f5081ec respect invisible text attribute
This is a weird attribute TBH.

xterm seems to replace the cells with spaces: copying and pasting
results in spaces.

Kitty ignores it.

VTE doesn't render it but allows copying and pasting.

The latter is now also the behavior in wezterm.
2022-09-08 08:43:27 -07:00
Wez Furlong
b3a1fc75f5 docs: normalize_to_nfc
refs: https://github.com/wez/wezterm/issues/2482
2022-09-08 07:21:36 -07:00
Wez Furlong
e1034df1f0 docs: changelog for https://github.com/wez/wezterm/issues/2500
closes: https://github.com/wez/wezterm/issues/2500
2022-09-08 07:03:57 -07:00
Wez Furlong
1cb31aa46a docs: changelog for https://github.com/wez/wezterm/pull/2491 2022-09-08 06:52:38 -07:00
Wez Furlong
c0fff4e843 Add wezterm.gui.default_key_tables()
This provides a means for more easily extending the default key
tables without forcing the user to recreate the entire config
for themselves.

wezterm.gui.default_keys is also added by this, but it is likely
not as useful.
2022-09-07 10:21:54 -07:00
Wez Furlong
026b9e3577 fix hyperlink underlines
There were two problems:

* We weren't correctly invalidating when the hover state changed
  (a recent regression caused by recent caching changes)
* We'd underline every link with the same destination on hover,
  not just the one under the mouse (longstanding wart)

Recent changes allow the application layer to reference the underlying
Lines directly, so we can restore the original and expected
only-highlight-under-the-mouse by switching to those newer APIs.

Adjust the cache values so that we know to also verify the current
highlight and invalidate.

I was a little surprised to see that this also works with mux client
panes: I was expecting to need to do some follow up on those because
they return copies of Line rather than references to them. That happens
to work because the mux client updates the hyperlinks at the time where
it inserts into its cache. The effect of that is that lines in mux
client panes won't update to new hyperlink rules if they were received
prior to a change in the config.

refs: https://github.com/wez/wezterm/issues/2496
2022-09-07 07:51:28 -07:00
Wez Furlong
77ed919098 invalidate the display when using ClearScrollback("ScrollbackAndViewport")
refs: https://github.com/wez/wezterm/issues/2498
2022-09-07 05:36:50 -07:00
Wez Furlong
dbacf98b89 fix incorrect underline attribute when scrolling
Given this sequence:

ENABLE-UNDERLINE CRLF SGR-RESET

if the CRLF caused the terminal to scroll, the newly created line
at the bottom would be filled in with a "blank" cell that had
the underline attribute set.

That's because we're supposed to preserve the coloring in that
scenario, but we were also preserving other SGR attributes.

This commit explicitly clears out under, over and strikethrough
lines from these blank attributes.

refs: https://github.com/wez/wezterm/issues/2489
2022-09-06 20:06:01 -07:00
Wez Furlong
bcc4015bc4 docs: fix typo 2022-09-06 07:58:13 -07:00
Wez Furlong
e585178d2f docs: changelog for #2452 #2492 2022-09-06 07:33:35 -07:00
Wez Furlong
02f769d36c docs: publish release 2022-09-05 14:36:08 -07:00
Wez Furlong
d6929a50d1 docs for switch_to_last_active_tab_when_closing_tab
refs: #2487
2022-09-05 14:34:00 -07:00
Wez Furlong
44b7753ef5 docs: changelog
refs: https://github.com/wez/wezterm/issues/1209
refs: https://github.com/wez/wezterm/issues/2483
2022-09-05 09:27:37 -07:00
Wez Furlong
68380188e8 fix hangul NFC shaping
We were getting data like this back from harfbuzz:

shaped font_idx=0 "파인더에서 만든 폴더" as: [.notdef=0+448|.notdef=0+448|.notdef=6+448|.notde=6+448|.notdef=6+448|.notdef=15+448|.notdef=15+448|.notdef=21+448|.notdef=21+448|.notdef=27+448|.notdef=27+448|space=33+448|.notdef=34+448|.notdef=34+448|.notdef=34+448|.notdef=43+448|.notdef=43+448|.notdef=43+448|space=52+448|.notdef=53+448|.notdef=53+448|.notdef=53+448|.notdef=62+448|.notdef=62+448]

which had a series of discontiguous and repeated runs for the same
cluster/region, but due to a logic error, we weren't coalescing them
together and were passing somewhat nonsensical ranges to the
next font for shaping.

This commit "simply" ensures that we code the checks for codepoint==0
(the `.nodef` seen above) and the results are at least correct
for this particular case.

refs: https://github.com/wez/wezterm/issues/2482
2022-09-04 21:24:30 -07:00
Wez Furlong
7158c435d5 lua: patch os.getenv with our own function
ad9490ee8f unset SHELL from the
environment on startup which had the consequence of causing
`os.getenv("SHELL")` to return `nil` when used in the config file.

Rather than simply restoring SHELL env var, recognize that reading
the environment from a long lived process is prone to seeing
stable environment forever.

We already compensate for this in the pty crate's understanding
of the base environment, so this commit patches `os.getenv`
and replaces it with our own imlementation that uses that same
logic.

The base environment logic has been extended to set SHELL from
the passwd database to round things out.

refs: https://github.com/wez/wezterm/discussions/2481
2022-09-04 15:39:28 -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
Wez Furlong
ecd7bc9842 docs: update for latest release 2022-09-03 20:54:27 -07:00
Wez Furlong
cf40906b9a docs: refine CharSelect docs 2022-09-03 14:28:52 -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
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
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