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

1334 Commits

Author SHA1 Message Date
unrelentingtech
d8a7d76cf5 colors: regenerate scheme data after previous commits 2022-09-08 06:51:01 -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
Funami580
cd2c2a1a83 charselect: add option to cycle to previous group of characters 2022-09-07 10:21:35 -07:00
Wez Furlong
66c267ef28 docs: fix typo 2022-09-07 09:24:42 -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
3583ccfc5e docs: slightly clarify language in ActivateLastTab 2022-09-05 09:50:21 -07:00
Wez Furlong
e1edd483f5 docs: link to SpawnCommandInNewTab from SpawnTab 2022-09-05 09:31:04 -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
1bb9a3fe81 docs: charselect and paneselect font & size config 2022-09-04 08:39:32 -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
3bb1ed61b5 docs: pane:get_metadata
refs: https://github.com/wez/wezterm/issues/2460
2022-09-03 19:45:23 -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
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
ab2c368a3c docs: update default assignments 2022-09-01 08:41:36 -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
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
0d85d05442 update conpty to v1.14.2281.0 release 2022-08-29 08:32:08 -07:00
Wez Furlong
1398c0d4b0 add user-var-changed event 2022-08-27 17:22:21 -07:00
Wez Furlong
f4fa87eca1 docs: mention CPU utilization improvements in changelog 2022-08-23 10:41:36 -07:00
Wez Furlong
53bc871147 ssh: correctly expand %h tokens in ssh config
refs: https://github.com/wez/wezterm/issues/2448
2022-08-23 10:32:07 -07:00
Wez Furlong
619b1ad292 scroll to bottom on mouse input when mouse is grabbed
refs: https://github.com/wez/wezterm/issues/2447
2022-08-23 10:15:39 -07:00
Wez Furlong
57b10ac094 Avoid full path canonicalization when resolving cwd
It can have some surprising effects, so leave it at the basic logical
composition of cwd + relative rather than physical.

refs: https://github.com/wez/wezterm/issues/2449
2022-08-23 09:55:45 -07:00
Wez Furlong
a8b1b6bd88 Add official dracula color scheme
refs: https://github.com/dracula/wezterm/issues/2
2022-08-23 09:45:12 -07:00
Wez Furlong
35ed9ac197 conpty: work around mangled tmux title sequence
refs: https://github.com/wez/wezterm/issues/2442
2022-08-21 18:14:13 -07:00
Wez Furlong
3ae647048e Add Sequoia color schemes
refs: https://github.com/Hiroya-W/wezterm-sequoia-theme/issues/1
2022-08-21 16:50:34 -07:00
Wez Furlong
94e95fca33 docs: changelog for max_fps https://github.com/wez/wezterm/discussions/2419 2022-08-21 15:27:45 -07:00
Wez Furlong
7caaf136e4 compensate for flickery TUI programs by going slower(!)
It's not the first time that I've solved a problem by slowing things
down... in this situation, a couple of very inefficient TUI programs had
flickering outputs in wezterm because they were filling a buffer with a
bunch of spaces to erase a screen before sending the main body of their
updates in a subsequent buffer chunk. wezterm would render the
intervening partially blank frame and appear to flicker.

The resolution is to add a small delay (3ms by default) before sending
data to the terminal model. If the output is readable in that time
we'll accumulate it with the pending set of actions so that the
whole batch can be applied "more atomically".

Take care: `time cat bigfile` is sensitive to this, so we want to
keep the latency as small as possible, and we also want to avoid
accumulating actions and only flushing them at the end of the file.

We use the existing buffer size (~1MB) as a threshold: we bump
a count of the number of input bytes that resulted in the current
set of actions, and if that exceeds that buffer size we flush it.

refs: https://github.com/wez/wezterm/issues/2443
2022-08-21 14:40:06 -07:00
Wez Furlong
a6ed7ef7ab docs: fix typo 2022-08-21 12:59:39 -07:00
Wez Furlong
9d6b4a3e17 docs: CopyMode assignments now have their own individual pages
refs: https://github.com/wez/wezterm/issues/2346
2022-08-21 11:05:56 -07:00
Wez Furlong
84df280b38 docs: changelog for https://github.com/wez/wezterm/issues/2350 2022-08-21 09:48:22 -07:00
Wez Furlong
58eecab4f8 docs: changelog for https://github.com/wez/wezterm/issues/2399 2022-08-20 23:02:29 -07:00
Wez Furlong
944ea1444e docs: fix link 2022-08-20 17:06:32 -07:00
Wez Furlong
78b5ac0eb5 add border size and color config
refs: https://github.com/wez/wezterm/issues/2417
2022-08-20 17:05:17 -07:00
Wez Furlong
8b3a52ba9a colors now override color_scheme
The prior mutually exclusive behavior kept surprising people so let's
just flip this around.

This is potentially a "breaking" change for folks, but I think it is
worth it.
2022-08-20 11:48:22 -07:00
Wez Furlong
8b2ef50ca7 gui-startup event now also works for wezterm ssh.
This is done by adjusting how `wezterm ssh` works; we now set up
the default domain and call into the main `wezterm start` logic.

refs: #284
2022-08-20 08:01:45 -07:00