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

208 Commits

Author SHA1 Message Date
Wez Furlong
b71e1ad618 Revise appimage env comment 2021-12-02 21:21:29 -07:00
Srevin Saju
37c3403241 fix: do not propagate $APPIMAGE and $APPDIR env vars to child processes 2021-12-02 21:21:29 -07:00
Wez Furlong
225e7a1243 introduce unicode_version config
This is a fairly far-reaching commit. The idea is:

* Introduce a unicode_version config that specifies the default level
  of unicode conformance for each newly created Terminal (each Pane)
* The unicode_version is passed down to the `grapheme_column_width`
  function which interprets the width based on the version
* `Cell` records the width so that later calculations don't need to
  know the unicode version

In a subsequent diff, I will introduce an escape sequence that allows
setting/pushing/popping the unicode version so that it can be overridden
via eg: a shell alias prior to launching an application that uses a
different version of unicode from the default.

This approach allows output from multiple applications with differing
understanding of unicode to coexist on the same screen a little more
sanely.

Note that the default `unicode_version` is set to 9, which means that
emoji presentation selectors are now by-default ignored.  This was
selected to better match the level of support in widely deployed
applications.

I expect to raise that default version in the future.

Also worth noting: there are a number of callers of
`unicode_column_width` in things like overlays and lua helper functions
that pass `None` for the unicode version: these will assume the latest
known-to-wezterm/termwiz version of unicode to be desired. If those
overlays do things with emoji presentation selectors, then there may be
some alignment artifacts. That can be tackled in a follow up commit.

refs: #1231
refs: #997
2021-11-25 09:00:45 -07:00
Jonathan
e9ed2b4d3e
Unzoom when switching panes (#1301)
* mux: unzoom when switching panes

Add `unzoom_on_switch_pane` config option:

When switching to another pane with ActivatePaneDirection, if the
current pane is zoomed, unzoom and then switch instead of doing nothing.

* Apply suggestions from code review

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2021-11-13 11:43:15 -08:00
Wez Furlong
4225610c09 add config option to enable resize increments, disable by default
refs: #1254
refs: #1289
2021-11-09 08:30:58 -07:00
Wez Furlong
04768fd1e2 Speculative fix for wonky vertical alignment
The issue seems to correlate with fractional pixels produced
by 0.5cell padding, so let's round down to avoid the fraction.

refs: https://github.com/wez/wezterm/issues/1228
2021-10-21 18:56:11 -07:00
Wez Furlong
c1a766404c config: add ssh_backend config, and default to libssh
refs: #1014
2021-10-21 07:16:42 -07:00
Wez Furlong
24875004f6 add canonicalize_pasted_newlines config option
refs: #1213
2021-10-17 13:14:16 -07:00
Wez Furlong
3b12aa1038 mux: mux_env_remove config to control which env var are removed
closes: #1225
2021-10-17 12:46:16 -07:00
Wez Furlong
32d18905cc Add wezterm.background_child_process 2021-10-17 10:37:47 -07:00
Wez Furlong
7e59916c5c fixup title font selection on linux
Was mistakenly trying to use the windows font because of negative logic.
Tidy up, and prefer the gnome default theme font (Cantarell), but fall
back to DejaVu Sans.
2021-10-09 08:12:26 -07:00
Wez Furlong
854ea8f2d1 change default window padding
This makes the default terminal config look a little nicer.
2021-10-08 20:38:28 -07:00
Wez Furlong
5d765e2efe config: adjust default title bar font
Make it a little large, bold, and pick a better approximation of the macOS
titlebar font on macOS.
2021-10-08 19:30:40 -07:00
Wez Furlong
8c3477006f Allow using unit like "1cell" or "5%" for window_padding
This commit introduces the `Dimension` type which allows specifying
a value in a variety of units; pixels, points, cells, percent.

`Dimension` needs contextual information to be evaluated as pixel
values, which makes resolving the value from the config slightly
more of a chore.

However, this type allows more flexible configurations that scale
with the font size and display dpi.

refs: #1124, #291, #195
2021-10-07 19:26:22 -07:00
Wez Furlong
49d77138ae gui: refine text positioning math around fancy tab bar
Avoid accidentally scaling the tab bar when using IncreaseFontSize.

Use a "better" default title font based on the platform.

Avoid a gap between bottom of tab button and dividing line at
certain font sizes.
2021-10-04 23:13:21 -07:00
Wez Furlong
962e44bbfb WIP: fancier tab bar
`use_fancy_tab_bar` switches to an alternate rendering of the tab
bar that uses the window_frame config to get a proportional
title font to use to render tabs, as well as rendering a few
additional elements to space out and make the tabs feel more
like tabs.

Computing the number of tabs doesn't respect the alternate font
at this time.

Formatted tab item foreground and background colors are also
not respected at this time.

refs: #1180
2021-10-04 17:35:54 -07:00
Wez Furlong
ca89181098 bell: allow changing the cursor color when the bell is rung
I find this less distracting than both the audible and the default
background color flashing.
2021-09-29 08:02:34 -07:00
Wez Furlong
72cb110b65 add audible_bell config option
This allows using the system beep sound, currently only on macos.

refs: #3
2021-09-26 12:55:19 -07:00
Benoit de Chezelles
317772fe8f lua: Add wezterm.action_callback to help define key callbacks 2021-09-25 15:42:08 -07:00
Wez Furlong
0c1ad718d0 add visual bell
refs: #3
2021-09-25 12:40:22 -07:00
Frieder Bluemle
3f4ea691af Add additional tab activation key assignments 2021-09-12 09:52:11 -07:00
Wez Furlong
93e18b2a01 deps: colorgrad -> 0.5 2021-09-05 23:27:01 -07:00
Wez Furlong
4c8ccf8efc Add Multiple key assignment
refs: https://github.com/wez/wezterm/pull/1091
2021-09-04 13:01:34 -07:00
Wez Furlong
bc4ed3735d Add SendKey key assignment
refs: https://github.com/wez/wezterm/pull/1091
2021-09-03 12:07:17 -07:00
Wez Furlong
b53a6059de increase max fps to 60 by default, improve coalesce
* Trigger a paint immediately from invalidate if not throttled
* Otherwise defer the other events until we're about to sleep for xcb
  events, which should maximize the coalesce around resize/expose events

refs: #1051
2021-09-02 08:53:03 -07:00
Jonas Belouadi
703f2c4d67 Remove explicit deref in 256-colors loop. 2021-08-23 16:32:43 -07:00
Jonas Belouadi
4565fc4ebd Deserialize indexed keys into 'u8' instead of 'String'. 2021-08-23 16:32:43 -07:00
Jonas Belouadi
46ea5d73e7 Format code with cargo fmt. 2021-08-23 16:32:43 -07:00
Jonas Belouadi
4b3853fb0f Add support for setting arbitrary colors ranging from 16 to 256. 2021-08-23 16:32:43 -07:00
Wez Furlong
c6e1889b04 remove unused alt alpha blending config
This doesn't make sense in a dual source blending world
2021-08-19 09:41:48 -07:00
Wez Furlong
571c137955 gui: gamma fixup
This makes the comparison in https://github.com/wez/wezterm/issues/544
work for me on mac, linux (x11, wayland) and also on Windows but
only using WGL.

It looks like we can use the proper colorspace on all targets
except for ANGLE EGL.  For whatever reason, the combination of
glium and ANGLE EGL on windows over-gamma corrects.

AFAICT, the framebuffer and perhaps the surfaces it creates
don't indicate srgb support, and whatever combination of status
they return tickles glium's srgb stuff the wrong way.

I think the "solution" is just to directly use WGL by default.

EGL was on by default because it tended to be more survivable
when graphics card drivers were updated, but the last couple
of times I updated mine it still killed wezterm anyway.

refs: #544
2021-08-19 09:17:09 -07:00
Wez Furlong
ab21910d80 deps: update bitflags -> 1.3 2021-08-15 18:21:17 -07:00
Wez Furlong
ab6c4777cb config: add wezterm.gradient_colors 2021-08-13 23:52:32 -07:00
Wez Furlong
e234ea7933 gradients: add presets 2021-08-13 22:41:31 -07:00
Wez Furlong
615b5b3966 gui: support radial gradients 2021-08-13 17:38:33 -07:00
Wez Furlong
d9e0340a94 gui: add some randomness to gradients to avoid banding 2021-08-13 13:35:55 -07:00
Wez Furlong
cbfb6d59c5 added new window_background_gradient config option 2021-08-12 23:08:38 -07:00
Wez Furlong
6f78ee4f14 deps: update unicode-segmentation to 1.8 2021-08-11 23:06:17 -07:00
Wez Furlong
3370466dc4 config: adjust default mux_output_parser_buffer_size
This size seems to be ~sweet spot for `time cat bigfile`, cutting the
time in half from the prior value.  Making the buffer smaller doesn't
improve things, nor does making it bigger; this is balancing the latency
of applying the update to the model with the back-pressured parsing
latency.
2021-08-11 23:06:16 -07:00
Wez Furlong
8cc90dcf33 tidy up add_to_config_reload_watch_list
refs: #989
2021-08-10 20:38:41 -07:00
AusCyberman
e8e40c9704
Added watch_path (#989) 2021-08-10 20:30:43 -07:00
Wez Furlong
2b6ba0dfcc increase default mux_output_parser_buffer_size
refs: #999
2021-08-08 16:41:14 -07:00
Wez Furlong
17fc41fc52 add option to select alternative alpha blending
I'm not sure if this is needed now that we have a single draw call, but
based on the history and the nuance of different gl/driver/os quirks it
feels like a good idea to keep this option in the back pocket.
2021-08-04 15:26:48 -07:00
Wez Furlong
fb9338f0e7 default disable kitty graphics until support is improved
You can run `wezterm --config enable_kitty_graphics=true` to do ad-hoc
tests with the protocol enabled.

refs: #986
refs: #1998
2021-07-31 10:23:44 -07:00
Wez Furlong
159abe5e28 mux: make action parser buffer size configurable and smaller
Previously, we'd use a 1MB buffer both to read the output from the
associated pty (blocking), and the same size buffer again to do the
non-blocking read on top of that.

For pathological cases (eg: cat 100MB+ files), we could build a
resulting `Vec<Action>` with over 1mm entries and it could take as much
as 100ms to apply those actions to the terminal model.

This meant that the output could stutter/lag and appear to be processed
more slowly.

This commit introduces a configuration value for the buffer size for the
second stage, and makes it 10KB in size.  This helps to constrain the
size of the Action vec and keeps the incremental processing costs down,
while still managing the same throughput.
2021-07-31 08:57:13 -07:00
Autumn Lamonte
ce9d166733 #133 ENQ response 2021-07-24 23:36:20 -07:00
Autumn Lamonte
d8cacee28a #133 blinking text 50% 2021-07-24 23:29:31 -07:00
Wez Furlong
d592696ca7 config: capture the value of WSLENV, rather than its name
Doh!
2021-07-22 07:14:03 -07:00
Cédric Schieli
77261ac374 Allow styling of the whole new tab button 2021-07-18 19:11:12 -07:00
Wez Furlong
91b3c64568 config: update WSLENV to hold TERM related environment
refs: #230
refs: #936
2021-07-18 17:49:41 -07:00