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

257 Commits

Author SHA1 Message Date
Wez Furlong
d99b025e24 docs: link to new GitHub Discussions thingy 2020-12-08 20:32:46 -08:00
Wez Furlong
2888428dda wezterm-font: add system font fallback on macOS
Teach the core text locator how to obtain the system fallback list
and add that to the fallback.

Fixup handling of ttc files on macOS; we'd always assume index 0
when extracting font info from the font descriptor.  We now make
the effort to enumerate the contents of the TTC and find a match.
2020-12-06 22:23:39 -08:00
Wez Furlong
92827a1bea wezterm: default dpi on macOS is now 72
https://wiki.lazarus.freepascal.org/Cocoa_DPI states that the dpi
on macOS is 72.  That matches up to the experimental results reported
in #332 (in which 74.0 appears about the right size).

This commit introduces a `DEFAULT_DPI` constant that is set to 72 on
macOS and 96 on other operating systems.

The result of this is that a 10 point Menlo font now appears to be
the same size in Terminal.app and WezTerm.app.

refs: https://github.com/wez/wezterm/issues/332
2020-12-06 18:34:06 -08:00
Wez Furlong
b2be2963a1 wezterm: fixup input processing for Option/dead keys
This commit improves input processing on macOS; passing the keyUp
events to the input context is required for dead keys to correct
process their state transitions.

In addition, we weren't passing key events through if any modifiers
were down; for dead keys we need to allow Option through.

This commit rigs up a little bit of extra state to avoid double-emitting
key outputs from the input context.

Lastly, the virtual key code is passed through to the KeyEvent to
enable binding to raw keys per 61c52af491

refs: #357
2020-12-06 17:49:26 -08:00
Wez Furlong
215a3bb297 docs: link to fedora 33 nightly builds 2020-12-04 22:09:48 -08:00
Benoit de Chezelles
c7dc44a538 Update fonts.markdown 2020-11-24 18:26:27 -08:00
Simon Legner
93ef3a7572 docs: fix capitalization of PageUp/PageDown 2020-11-24 10:45:42 -08:00
Wez Furlong
3b69586416 wezterm: add allow_square_glyphs_to_overflow_width = "WhenFollowedBySpace"
Adds an option to control how wide glyphs (more specifically: square
aspect glyphs) are scaled to conform to their specified width.

The three options are `Never`, `Always`, and `WhenFollowedBySpace`.

When a glyph is loaded, if it is approximately square, this option is
consulted.  If overflow is permitted then the glyph will be scaled
to fit only the height of the cell, rather than ensuring that it fits
in both the height and width of the cell.

refs: #342
2020-11-24 10:38:20 -08:00
Benoit de Chezelles
eee40f7d17 Update permute_any_mods.md 2020-11-23 17:22:21 -08:00
Benoit de Chezelles
2963520a1e Update permute_any_or_no_mods.md 2020-11-23 17:22:21 -08:00
Benoit de Chezelles
d4d3e70a9b Update permute_any_or_no_mods.md 2020-11-23 14:52:45 -08:00
Wez Furlong
eabfa3c0f8 term: fix ALT-Escape
This appears to have been accidentally broken as part of the churn
around building out CSI-u key encoding in
6289c08a4e

closes: https://github.com/wez/wezterm/issues/338
2020-11-23 14:20:43 -08:00
Wez Furlong
dc453f2eed deps: update bundled harfbuzz to 2.7.2 2020-11-23 08:43:53 -08:00
Wez Furlong
6716d40222 Add note about AA shadows to changelog
(and fix a typo in the comment in the shader)

closes: #331
2020-11-20 09:10:39 -08:00
Wez Furlong
0bb02ff674 docs: note about #320 in changelog
refs: #320
2020-11-15 22:26:20 -08:00
Wez Furlong
e8ad765ff5 wezterm: add SelectionMode::SemanticZone
This makes it possible to configure wezterm to eg: triple click
on command input (or output) to select the entire input or output
without messing around trying to find the bounds.

The docs have an example of how to configure this; it requires
setting up shell integration to define the appropriate semantic
zones.
2020-11-15 22:23:18 -08:00
Wez Furlong
67b2725f47 docs: expand shell integration docs 2020-11-14 09:22:20 -08:00
Wez Furlong
ab87752269 wezterm: add --class option to specify window class
The class name is process-global; all windows created by that
instance of wezterm will have the same class name.

closes: #325
2020-11-13 08:15:35 -08:00
Wez Furlong
c3c9ed881c wezterm: fix SpawnWindow not using cwd from current pane
There were two problems:

* It was using an old code path that didn't even try to resolve the cwd
* The NewWindow code path would "forget" the originating window and then
  fail to resolve the current pane + path from the new, empty window
  that it is building.

closes: https://github.com/wez/wezterm/issues/322
2020-11-12 08:26:35 -08:00
Wez Furlong
37a3f7db5f wezterm: add ScrollToPrompt key assignment
Adds some supporting methods for computing the `SemanticZone`s
in the display and a key assignment that allows scrolling the
viewport to jump to the next/prev Prompt zone.
2020-11-08 09:58:02 -08:00
Wez Furlong
1dfc06febb docs: changelog for the last couple of fixes 2020-11-03 09:10:55 -08:00
Wez Furlong
500bf1b376 docs: note about #316
refs: #316
2020-11-01 10:36:33 -08:00
Wez Furlong
bb49ecca98 docs: update for 20201031-154415-9614e117 release 2020-10-31 15:51:08 -07:00
Wez Furlong
7a934ae63d docs: clarify color scheme search path
refs: https://github.com/wez/wezterm/issues/313
2020-10-30 22:56:32 -07:00
Wez Furlong
6dcf921dc3 docs: remove note about toml config support
This hasn't been supported in the past couple of releases
2020-10-30 22:37:49 -07:00
Wez Furlong
e2605d6b21 docs: clarify how to upgrade brew nightly 2020-10-30 22:36:11 -07:00
Wez Furlong
863a64cea2 docs: reorder and refine changelog items 2020-10-30 21:09:35 -07:00
Wez Furlong
5b9c86d836 colors: set cursor border to bg in the color schemes
This avoids having a green (by default) border around the cursor.
The dynamic color escape sequences have been updated to also
change the border color when the cursor background color is changed.
2020-10-27 09:17:20 -07:00
Wez Furlong
b9bdacfc58 docs: fix a couple of links 2020-10-27 09:02:09 -07:00
Wez Furlong
114c67d338 docs: mention VRAM and image improvements 2020-10-25 12:29:20 -07:00
Wez Furlong
f6fcf2e2f6 docs: discuss styling inactive panes
closes: #297
2020-10-25 12:17:25 -07:00
Wez Furlong
7f82f333f1 wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.

* `window_background_opacity` controls the overall window capacity,
  whether a background image is present or not.
* When a background image is present, or if the window is transparent,
  then text whose background color is the default background is
  changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
  text whose background color is NOT the default background.
  It defaults to 1.0 (fully opaque), but can be set to be
  transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
  have been factored out into their own struct which changes
  that set of options to:

```lua
return {
  inactive_pane_hsb = {
    hue = 1.0,
    saturation = 1.0,
    brightness = 1.0,
  },
}
```

* `window_background_image_hsb` is a new option that can apply
  a hue, saturation, brightness transformation to a background
  image.  This is primarily useful to make a background image
  darker:

```lua
return {
  window_background_image = "/some/pic.png",
  window_background_image_hsb = {
    brightness = 0.3,
  },
}
```

refs: #302
refs: #297
2020-10-23 23:16:00 -07:00
Wez Furlong
9e53462348 docs: adjust screenshots to include cursor color
Make sure the window is active when capturing all the screenshots.
2020-10-20 09:55:32 -07:00
Wez Furlong
83c52ef27a docs: format and wording tweak for color schemes 2020-10-20 00:55:35 -07:00
Wez Furlong
30fc374ad8 docs: add colorschemes + screenshots
This includes a script to generate a screenshot from a wezterm
running the default config under X11.

It expects the iTerm2-Color-Schemes to be checked out alongside
the wezterm repo as it uses the dynamic color schemes scripts
to activate the schemes one by one and capture the display.
2020-10-20 00:40:25 -07:00
Wez Furlong
95ab1b34e1 Update color schemes
Sync with 0966005b77
2020-10-19 22:51:48 -07:00
Wez Furlong
1978eba0a1 wezterm: make the split color configurable and darker
This makes the color of the split divider darker by default,
and configurable via the color scheme configuration file.

refs: #297
2020-10-19 22:05:13 -07:00
Wez Furlong
eaa6536325 wezterm: remove OldSoftware frontend
Upcoming changes to the GUI mean that it will be double
the work to keep maintaining this, and it is already lagging
behind on pane support.

With the Mesa llvmpipe fallback we should be in a pretty
good state to not need another non-GL implementation.
2020-10-19 09:22:02 -07:00
Wez Furlong
80e36f93b9 docs: add a screenshot demonstrating background image 2020-10-19 08:59:53 -07:00
Wez Furlong
aa660d5d06 wezterm: apply transparency tint to all background colors
refs: https://github.com/wez/wezterm/issues/141#issuecomment-711442986
2020-10-18 21:51:12 -07:00
Wez Furlong
21eab3430b docs: add docs on background/opacity configs
refs: #141
2020-10-18 14:32:17 -07:00
Wez Furlong
cabb8ca903 docs: macos: note about dead keys and IME
refs: https://github.com/wez/wezterm/issues/300
2020-10-18 14:07:23 -07:00
Wez Furlong
191b047126 macos: implement opacity for CGL and Metal
There's a few different knobs to turn, but this
commit turns them and we're now able to respect
opacity settings for both OpenGL/CGL and Metal
renderers.

closes: #141
2020-10-18 14:00:06 -07:00
Wez Furlong
b7e303f39c Windows: prefer to use Direct3D11 via ANGLE
This is similar in spirit to the work in 4d71a7913a
but for Windows.

This commit adds ANGLE binaries built from
07ea804e62
to the repo.  The build and packaging will copy those into the same
directory as wezterm.exe so that they can be resolved at runtime.

By default, `prefer_egl = true`, which will cause the window
crate to first try to load an EGL implementation.  If that fails,
or if `prefer_egl = false`, then the window crate will perform
the usual WGL initialization.

The practical effect of this change is that Direct3D11 is used for the
underlying render, which avoids problematic OpenGL drivers and means
that the process can survive graphics drivers being updated.

It may also increase the chances that the GPU will really be used
in an RDP session rather than the pessimised use of the software
renderer.

The one downside that I've noticed is that the resize behavior feels a
little janky in comparison to WGL (frames can render with mismatched
surface/window sizes which makes the window contents feel like they're
zooming/rippling slightly as the window is live resized). I think this
is specific to the ANGLE D3D implementation as EGL on other platforms
feels more solid.

I'm a little on the fence about making this the default; I think
it makes sense to prefer something that won't quit unexpectedly
while a software update is in progress, so that's a strong plus
in favor of EGL as the default, but I'm not sure how much the
resize wobble is going to set people off.

If you prefer WGL and are fine with the risk of a drive update
killing wezterm, then you can set this in your config:

```lua
return {
  prefer_egl = false,
}
```

refs: https://github.com/wez/wezterm/issues/265
closes: https://github.com/wez/wezterm/issues/156
2020-10-17 19:08:16 -07:00
Wez Furlong
4d71a7913a macOS: bundle and use MetalANGLE to enable Metal rendering
This commit adjusts the window layer to have it try to load EGL
implementations on macOS.  This is important as the system
provided OpenGL implementation is deprecated and I wanted to
have a path forward for when it is finally removed.

If EGL fails to initialize, we fall back to the CGL/OpenGL
implementation that we used previously.

I've included binaries built for 64-bit intel from the MetalANGLE
project; here's how I built them:

```
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --depth 1
git clone https://github.com/kakashidinho/metalangle --depth 1
cd metalangle
PATH=$PWD/../depot_tools:$PATH python scripts/bootstrap.py
PATH=$PWD/../depot_tools:$PATH gclient sync
PATH=$PWD/../depot_tools:$PATH gn --args="is_debug=false angle_enable_metal=true angle_enable_vulkan=false angle_enable_gl=false angle_build_all=false" gen out/Release
PATH=$PWD/../depot_tools:$PATH autoninja -C out/Release
```

Those steps are a little too long to want to put them directly
into the wezterm CI.

It is important for metalangle to be >= 8230df39a5
in order for scaling to be handled correctly when dragging windows
between monitors.

refs: https://github.com/kakashidinho/metalangle/issues/34
2020-10-17 09:34:01 -07:00
Wez Furlong
4a43c30c9a docs: changelog for Hide fix
refs: #296
2020-10-16 12:15:11 -07:00
Wez Furlong
2a8a0a6740 docs: changelog and info on dead keys on Windows
refs: #296
refs: #275
2020-10-16 12:13:30 -07:00
Wez Furlong
157de37079 docs: note about the rcgen TLS PKI fix 2020-10-16 07:59:01 -07:00
Wez Furlong
9e46ac83be Windows: force Mesa/Software mode when started in an RDP session
refs: #265
2020-10-14 09:21:30 -07:00
Wez Furlong
05b02e178b window: fix Hide action on Windows
This was hiding the window completely with no way to show it again(!).
Change it instead to minimize, which was the intent.

refs: #296
2020-10-14 08:42:55 -07:00