1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-29 00:21:57 +03:00
wezterm/docs
Wez Furlong db08b8c1dc add window:set_config_overrides lua method
This commit expands on the prior commits to introduce the concept
of per-window configuration overrides.

Each TermWindow maintains json compatible object value holding
a map of config key -> config value overrides.

When the window notices that the config has changed, the config
file is loaded, the CLI overrides (if any) are applied, and then
finally the per-window overrides, before attempting to coerce
the resultant lua value into a Config object.

This mechanism has some important constraints:

* Only data can be assigned to the overrides.  Closures or special
  lua userdata object handles are not permitted.  This is because
  the lifetime of those objects is tied to the lua context in which
  they were parsed, which doesn't really exist in the context of
  the window.
* Only simple keys are supported for the per-window overrides.
  That means that trying to override a very specific field of
  a deeply structured value (eg: something like `font_rules[1].italic = false`
  isn't able to be expressed in this scheme.  Instead, you would
  need to assign the entire `font_rules` key.  I don't anticipate
  this being a common desire at this time; if more advance manipulations
  are required, then I have some thoughts on an event where arbitrary
  lua modifications can be applied.

The implementation details are fairly straight-forward, but in testing
the two examplary use cases I noticed that some hangovers from
supporting overrides for a couple of font related options meant that the
window-specific config wasn't being honored.  I've removed the code that
handled those overrides in favor of the newer more general CLI option
override support, and threaded the config through to the font code.

closes: #469
closes: #329
2021-02-27 14:53:19 -08:00
..
colorschemes colors: set cursor border to bg in the color schemes 2020-10-27 09:17:20 -07:00
config add window:set_config_overrides lua method 2021-02-27 14:53:19 -08:00
install update for rename of master branch -> main 2021-02-03 21:34:12 -08:00
screenshots docs: document foreground_text_hsb 2021-02-20 11:24:10 -08:00
_config.yml docs: switch to the "Hacker" theme which is darker 2019-12-18 09:25:36 -08:00
book.toml Revert "ci: disable mdbook-linkcheck" 2021-02-24 09:28:00 -08:00
changelog.md add window:set_config_overrides lua method 2021-02-27 14:53:19 -08:00
contributing.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
copymode.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
custom.css style download buttons a bit better 2019-12-29 21:39:23 -08:00
escape-sequences.md docs: note about OSC 9 and OSC 777 toast notification support 2021-02-23 09:18:23 -08:00
faq.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
features.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
help.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
hyperlinks.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
imgcat.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
index.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
installation.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
multiplexing.md docs: document various missing things 2021-02-20 10:40:26 -08:00
scrollback.md docs: fix link to ClearScrollback 2021-02-20 08:44:39 -08:00
serial.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00
shell-integration.md update for rename of master branch -> main 2021-02-03 21:34:12 -08:00
ssh.md docs: upgrade to mdbook 0.4, enable link checking 2021-01-30 14:14:29 -08:00