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

201 Commits

Author SHA1 Message Date
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
Wez Furlong
1f5b900f3d plumb appearance change event -> reload on macos
This commit causes a window-config-reloaded event to trigger
when the appearance (dark/light mode) is changed on macos.

It also arranges to propagate the window level config to newly
spawned panes and tabs, created both via the gui and via the
CLI/mux interface.

refs: https://github.com/wez/wezterm/issues/894
refs: https://github.com/wez/wezterm/issues/806
2021-07-18 00:01:53 -07:00
Wez Furlong
75eaaab6a1 Allow window config overrides to apply per-pane
This allows window-level config overrides to apply
to panes contained within the window.

For instance, this allows setting a window-level
color scheme.
2021-07-17 23:02:41 -07:00
Wez Furlong
ac5199c216 config: add bypass_mouse_reporting_modifiers option
This allows changing eg: SHIFT to ALT for bypassing mouse reporting.

refs: https://github.com/wez/wezterm/issues/911
2021-07-11 22:02:23 -07:00
Wez Furlong
db6da81272 window: move away from async event queue
I added this originally thinking that it would make it easier to resolve
https://github.com/wez/wezterm/issues/695 and to integrate wgpu support,
but it's the cause of https://github.com/wez/wezterm/issues/922 so let's
take it out and more directly connect the window events to those in the
terminal.

This commit likely breaks mac and windows; pushing it so that I can
check it out and verify on those systems.
2021-07-10 17:30:19 -07:00
Wez Furlong
9c77d56026 RgbColor: hide internal red, green, blue fields
I'd like to adjust this to support 10bpc color, so the first step
is hiding the individual 8bpc fields.
2021-07-10 14:22:31 -07:00
Wez Furlong
423b208780 font weight can now be specified as the underlying opentype weight
opentype allows a font to have a weight in the range 0-1000.
MacOS has its own concept of symbolic weight names and opentype
values that is a slightly different scale of boldness to Windows
and Linux.

That means that Medium could be a different range of opentype
weight values depending on the system.

To further complicate things, the font designer can name their
variant with any name they like and assign it an arbitrary
opentype weight value.

For the Operator Mono font, it has Book variant with opentype
weight 325 and a Light variant with an opentype weight of 300.

wezterm was considering these both to have `FontWeight::Light` because
that's how those values were bucketed, which results in amibiguity in
resolve the font and frustration in not being able to access one of the
variants.

This commit changes the `FontWeight` type to now hold the unambiguous
opentype weight value, and to define some symbolic aliases for
some specified weights.

When serializing, if the weight matches a symbolic alias, then that
name will be used in the canonical name (eg: as listed via ls-fonts).
Otherwise, the numeric value will be used.

When parsing the font configuration, wezterm will allow both symbolic
and numeric values.

This allows all of the Operator Mono variants to be referenced
unambiguously, although some variants have to be specified via the
numeric weight:

```
wezterm.font("Operator Mono", {weight=275, stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-XLight.otf, FontDirs
wezterm.font("Operator Mono", {weight="Light", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Light.otf, FontDirs
wezterm.font("Operator Mono", {weight=325, stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Book.otf, FontDirs
wezterm.font("Operator Mono", {weight="DemiLight", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Medium.otf, FontDirs
wezterm.font("Operator Mono", {weight="Regular", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Bold.otf, FontDirs
```

https://github.com/wez/wezterm/issues/849#issuecomment-873454483
2021-07-04 08:55:08 -07:00
Wez Furlong
c514254138 wayland: use proportional font for title bar
allow specifying the font in the config file
2021-06-27 13:04:20 -07:00