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

226 Commits

Author SHA1 Message Date
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
Wez Furlong
b24082714e docs: more changelog updates
refs: #265
2020-10-13 20:26:27 -07:00
Wez Furlong
d2d604f002 docs: note about fixing EGL init on Linux
closes: #272
2020-10-13 20:17:19 -07:00
Wez Furlong
11c6d905a7 docs: note about macos trackpad sensitivity fix
closes: #206
2020-10-13 20:14:38 -07:00
Wez Furlong
c8d59dffb6 macos: fix an issue where new windows created cocoa tabs
To reproduce the problem, maximize wezterm, then press CMD-N.

This commit tells the window not to use cocoa native tabs and
instead really create a new window when we ask it to create
a new window.

closes: #254
2020-10-12 17:20:12 -07:00
Wez Furlong
b3f51e8ee2 termwiz: save 8 bytes per Cell in common case
Moved the image and hyperlink portion of CellAttributes out
to a separate heap structure, saving 8 bytes per Cell
for the common case of no hyperlink and no image.
2020-10-11 13:32:53 -07:00
Wez Furlong
ab6cda81aa Add permute_any_mods and permute_any_or_no_mods functions
refs: #288
2020-10-10 15:11:21 -07:00
Wez Furlong
787f956e24 docs: add LEADER to changelog 2020-10-10 10:55:22 -07:00
Wez Furlong
59e1e9313d docs: add splits/panes to features list 2020-10-10 10:52:15 -07:00
Wez Furlong
6c12e2e981 docs: more pane related docs 2020-10-10 10:49:36 -07:00
Wez Furlong
87b4a525d3 docs: document LEADER mod 2020-10-10 09:57:38 -07:00
Wez Furlong
fef80735c8 docs: add various pane related key assignments 2020-10-10 09:50:18 -07:00
Wez Furlong
40d07088d9 docs: Update for confirm parameter when closing panes, tabs 2020-10-10 09:19:57 -07:00
Wez Furlong
809bb53387 docs: split out the KeyAssignment enum variants
This makes the individual functions a bit easier to discover,
and a lot easier to link to.
2020-10-10 08:45:13 -07:00
Wez Furlong
b009e8c0d4 docs: add docs for the window object
refs: #225
2020-10-09 23:34:35 -07:00
Wez Furlong
850fdf40de docs: add docs for the Pane object
refs: #225
2020-10-09 23:22:52 -07:00
Wez Furlong
ccc0bf824d docs: lua: add undocumented wezterm.XXX items
Adds docs for some of the newer lua scripting functions.

refs: #222
refs: #223
refs: #225
2020-10-09 22:50:46 -07:00
Wez Furlong
6e0836d11a docs: Make it easier to split out docs into multiple pages 2020-10-09 22:03:59 -07:00
Wez Furlong
3f466b1fc3 wezterm: add automatically_reload_config=false option
closes: https://github.com/wez/wezterm/issues/287
2020-09-30 08:47:41 -07:00
Wez Furlong
d880c2b86f docs: update changelog for nightly 2020-09-30 08:33:21 -07:00
Wez Furlong
f4dc7a2a3a docs: fixup example 2020-09-27 12:19:25 -07:00
Wez Furlong
957cc592a6 wezterm: allow using {} (an empty table) to represent None in lua
`wezterm.action{ExtendSelectionToMouseCursor=nil}` doesn't produce an
`ExtendSelectionToMouseCursor(None)` value because a table value of
`nil` is equivalent to that key not being present and lua sees just
an empty table.

Instead we need to accept `ExtendSelectionToMouseCursor={}` a valid
way to indicate an `Option::None` which is what this commit does.

Due to weirdness that I haven't had a chance to run down, passing
that value through `wezterm.action` doesn't produce the intended
value, so I'm adjusting the docs to show to specify an alternative
syntax for this as part of this commit.

refs: https://github.com/wez/wezterm/issues/282
2020-09-27 10:45:11 -07:00
Wez Furlong
146b4465ba wezterm: update mux protocol for splits
refs: https://github.com/wez/wezterm/issues/157
2020-09-26 20:14:28 -07:00
Wez Furlong
2d3f4f9bf9 wezterm: guess at cwd associated with pty on linux
We still prefer to consume the OSC 7 value, but can fall back
to guessing the cwd for a target process.
2020-09-26 11:51:21 -07:00
Wez Furlong
81ba73d5b8 wezterm: display tab indices in tab bar by default
More details in the included changelog update

refs: https://github.com/wez/wezterm/issues/157#issuecomment-699520149
2020-09-26 09:52:16 -07:00
Wez Furlong
6708ea4b36 window: normalize SHIFT modifier state
When a keypress is ASCII uppercase and SHIFT is held, remove SHIFT
from the set of active modifiers.

refs: https://github.com/wez/wezterm/issues/157#issuecomment-699516096
2020-09-26 09:17:51 -07:00
Wez Furlong
13dc7bd95b docs: fixup link to splits issue 2020-09-25 20:21:18 -07:00
Wez Furlong
afa9d90212 docs: document how to disable default key/mouse bindings
refs: https://github.com/wez/wezterm/issues/274#issuecomment-699285487
2020-09-25 20:07:14 -07:00
Wez Furlong
77eabed349 docs: add note about splits/panes in master/nightly builds
refs: https://github.com/wez/wezterm/issues/157
2020-09-23 21:19:12 -07:00
Wez Furlong
a6316315bb wezterm: introduce concept of Pane to the Mux model
This adds an extra level of indirection to the Mux model;
previously we allowed for Windows to contain an ordered
collection of Tabs, where each Tab represented some kind
of pty.

This change effectively renames the existing Tab trait to Pane
and introduces a new Tab container, so the new model is that
a Window contains an ordered collection of Tabs, and each Tab
can have a single optional Pane.

refs: https://github.com/wez/wezterm/issues/157
2020-09-20 08:27:32 -07:00
Wez Furlong
d939211dc5 docs: fix typo in changelog 2020-09-12 09:39:51 -07:00
Wez Furlong
581ef0a448 docs: 20200909-002054-4c9af461 2020-09-09 00:21:42 -07:00