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

391 Commits

Author SHA1 Message Date
Wez Furlong
41a0148c50 x11: fix reporting shift modifiers for SHIFT-Enter, Space, Tab
refs: https://github.com/wez/wezterm/issues/516
2021-03-07 22:13:53 -08:00
Benoit de Chezelles
afe0450201 Add changelog entry for treat_left_ctrlalt_as_altgr 2021-03-07 12:52:03 -08:00
Benoit de Chezelles
abcc73fd22 Extract doc of treat_left_ctrlalt_as_altgr and leave a reference 2021-03-07 12:52:03 -08:00
Benoit de Chezelles
683d8e96e8 windows: Add option to treat left ctrl-alt as altgr
The previous behavior was to always treat ctrl-alt as altgr on Windows,
this has been done to better support altgr through a VNC session,
but this is very unintuitive when you don't need this behavior.

ref: #472
2021-03-07 12:52:03 -08:00
Wez Furlong
ffa106d729 docs: move this changelog entry to the right place! 2021-03-07 10:12:27 -08:00
Wez Furlong
ec12eed180 docs: migrate misc.md to individual config pages 2021-03-07 00:10:28 -08:00
Wez Furlong
4b7f774bc5 Bundle PowerlineExtraSymbols as a fallback font 2021-03-06 19:12:35 -08:00
Wez Furlong
90eb69f68a docs: add wezterm.battery_info docs with an example
refs: https://github.com/wez/wezterm/issues/500
2021-03-06 16:42:31 -08:00
Wez Furlong
014acf1a4a add docs for window decoration stuff 2021-03-06 11:32:15 -08:00
Wez Furlong
a5bc89e6d3 docs: update build/run from source instructions 2021-03-04 21:56:49 -08:00
Wez Furlong
7e1d16e671 Add SUPER+Drag to drag the window 2021-03-03 23:45:02 -08:00
Wez Furlong
b614719ff3 docs: mention freebsd along with other platforms 2021-03-03 08:48:41 -08:00
Wez Furlong
62917c63b6 docs: add installation info for FreeBSD 2021-03-03 08:45:58 -08:00
Wez Furlong
144a39bf9f docs: add FAQ about powershell cursor key problems
refs: https://github.com/wez/wezterm/issues/510
refs: https://github.com/PowerShell/PowerShell/issues/12268
2021-03-03 08:26:30 -08:00
Wez Furlong
76c7ef56df term: RIS must clear the scrollback
closes: #511
2021-03-03 07:44:57 -08:00
Wez Furlong
ff8bda29e3 lua: add wezterm.strftime
refs: https://github.com/wez/wezterm/issues/500
2021-03-02 09:52:54 -08:00
Wez Furlong
565a4c69d5 lua: add wezterm.format function
The intent is to use this to compose text for a configurable tab bar.

refs: https://github.com/wez/wezterm/issues/500
2021-03-02 09:52:54 -08:00
Wez Furlong
62e14efcb3 lua: add log_info and log_warn 2021-03-02 09:52:54 -08:00
Wez Furlong
522d4ad814 make exit_behavior = "CloseOnCleanExit" the default
It seems generally useful and non-intrusive, so do that.
2021-02-28 12:01:07 -08:00
Wez Furlong
0597684ebd Render custom block glyphs
As explained in the docs included in this commit, ideally this
wouldn't be needed, but due to a long-standing hinting bug in
freetype <https://gitlab.freedesktop.org/freetype/freetype/-/issues/761>
it seems most expedient to just render our own block glyphs,
so that's what this does!

refs: #433
2021-02-28 09:43:26 -08:00
Wez Furlong
27837b56b4 fix: triple click (line selection) to consider wrapped lines
closes: https://github.com/wez/wezterm/issues/466
2021-02-28 00:31:26 -08:00
Wez Furlong
04ecd16493 remove --front-end CLI option
Can use `--config front_end="Software"` instead.
2021-02-27 23:59:04 -08:00
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
Wez Furlong
60be1a98a0 lua: add window::effective_config() method
Expose the current window configuration to lua scripts.

refs: https://github.com/wez/wezterm/issues/469
2021-02-27 12:39:22 -08:00
Wez Furlong
2d02df5f38 add --config name=value CLI options
`wezterm`, `wezterm-gui` and `wezterm-mux-server` now all support
a new `--config name=value` CLI option that can be specified
multiple times to supply config overrides.

Since there isn't a simple, direct way to update arbitrary fields
of a struct in Rust (there's no runtime reflection), we do this
work in lua.

The config file returns a config table. Before that is mapped
to the Rust Config type, we have a new phase that takes each
of the `--config` values and applies it to the config table.

For example, you can think of configuration as working like this
if wezterm is started as `wezterm --config foo="bar"`:

```lua
config = load_config_file();
config.foo = "bar";
return config;
```

The `--config name=value` option is split into `name` and `value`
parts.  The name part is literally concatenated with `config` in
the generated lua code, so the name MUST be valid in that context.
The `value` portion is literally inserted verbatim as the rvalue in the
assignment.  Not quoting or other processing is done, which means
that you can (and must!) use the same form that you would use in
the config file for the RHS.  Strings must be quoted.  This allows
you to use more complicated expressions on the right hand side,
such as:

```
wezterm --config 'font=wezterm.font("Fira Code")'
```

The overrides stick for the lifetime of the process; even if
you change the config file and reload, then the value specified
by the override will take precedence.

refs: https://github.com/wez/wezterm/issues/469
refs: https://github.com/wez/wezterm/issues/499
2021-02-27 10:53:45 -08:00
Wez Furlong
823213703c mux: introduce can_close_without_prompting concept to model
This is defined as a trait method on Pane (default: false), and has the
obvious transitive equivalent methods in Tab and Window (eg: if all
contained items are `can_close_without_prompting`, then that container
is also `can_close_without_prompting`).

The intent is to avoid bothering the user to confirm closing a window
when the content is not stateful and doesn't warrant it.

For example: the window that is displayed in the event of a
configuration error really shouldn't prompt to the user to confirm
closing it.

All termwiztermtab panes are `can_close_without_prompting==true`
to effect this policy.

In the future, we could teach LocalPane to lookup the session leader
process against a list of "uninteresting" or "stateless" processes
and return an appropriate result (as suggested in
https://github.com/wez/wezterm/issues/280).  That functionality
is NOT part of this commit.
2021-02-27 09:03:13 -08:00
Wez Furlong
02828c708a docs: fix a typo, expand exit_behavior example 2021-02-27 00:24:23 -08:00
Wez Furlong
697a6abd04 add exit_behavior config option
`exit_behavior = "Hold"` will keep the pane alive until explicitly
closed.  More details in the docs that are part of this commit.

refs: https://github.com/wez/wezterm/issues/499
2021-02-27 00:15:51 -08:00
Wez Furlong
38e6a1bc4c window: fix ToggleFullScreen on Windows
closes: https://github.com/wez/wezterm/issues/177
2021-02-26 19:39:35 -08:00
Wez Furlong
39f7332378 changelog: add a couple of items (OSC52, ANGLE in .zip) 2021-02-25 22:31:04 -08:00
Wez Furlong
2dee60587f changelog entry for #475
refs: https://github.com/wez/wezterm/issues/475
2021-02-25 22:25:27 -08:00
Wez Furlong
35060fb2de Revert "ci: disable mdbook-linkcheck"
This reverts commit bef0fa29ac and
bb2d45d0aa.

refs: https://github.com/Michael-F-Bryan/mdbook-linkcheck/issues/53
2021-02-24 09:28:00 -08:00
Wez Furlong
036c48d76c docs: note about OSC 9 and OSC 777 toast notification support
refs: #489
2021-02-23 09:18:23 -08:00
Wez Furlong
7cecbd50dd docs: add some credits for a couple of issues
refs: #481, #490, #465
2021-02-23 09:01:42 -08:00
Wez Furlong
181ed704c9 docs for freetype_load_target and deprecation of font_antialias
refs: #491
2021-02-23 08:49:46 -08:00
Wez Furlong
9eb85e9cbc docs: link Nop -> DisableDefaultAssignment 2021-02-23 08:13:25 -08:00
Wez Furlong
bef0fa29ac ci: disable mdbook-linkcheck
It no longer builds, and switching to an older version produces
errors :-(

refs: https://github.com/Michael-F-Bryan/mdbook-linkcheck/issues/53
2021-02-23 08:10:38 -08:00
Wez Furlong
c964b69b1d Add ScrollByLine key assignment
refs: #497
2021-02-23 08:02:07 -08:00
Wez Furlong
7a16e71e07 Add ResetFontAndWindowSize key assignment
closes: https://github.com/wez/wezterm/issues/480
2021-02-20 21:50:20 -08:00
Wez Furlong
528a4846c7 docs: changelog and improve the foreground_text_hsb docs
refs: #491
2021-02-20 11:36:04 -08:00
Wez Furlong
39b5a21107 docs: document foreground_text_hsb
It even has screen shots!

refs: #491
2021-02-20 11:24:10 -08:00
Wez Furlong
088d8e5455 docs: note about config being a "pure function"
closes: #477
2021-02-20 10:53:29 -08:00
Wez Furlong
58fde836c3 docs: document various missing things
refs: https://github.com/wez/wezterm/issues/63
refs: https://github.com/wez/wezterm/issues/461
2021-02-20 10:40:26 -08:00
Wez Furlong
fd29ed09c4 docs: fix link to ClearScrollback 2021-02-20 08:44:39 -08:00
Wez Furlong
6c1c5f8714 docs: move mouse binding to its own page 2021-02-20 08:38:46 -08:00
Wez Furlong
c13b592d55 docs: changelog for #470
closes: #470
2021-02-16 20:24:09 -08:00
Wez Furlong
b4ded64e14 wayland: fix an issue with key repeat potentially hanging/spinning 2021-02-13 19:47:06 -08:00
Wez Furlong
f697de82fc wayland: fix initial window decoration, toggle full screen
This fixes a longstanding issue under mutter where client side
decorations are in use.  The decorations were being drawn too
early in the initialization of the window which could leave them
off-screen and weird.  This was masked by a couple of mutter
related bugs with client side decorations.

With these changes I now get sane decorations under mutter,
and the toggle fullscreen action is now enabled as well!

closes: #224
2021-02-13 11:02:04 -08:00
Wez Furlong
894d056947 wayland: allow matching raw modifiers for raw:123 key bindings 2021-02-13 09:11:55 -08:00
Wez Furlong
7b86a84bc3 window: avoid invalidating on mouse move
We weren't didn't treat the "No existing hyperlink, No new hyperlink"
case as no change in hyperlink, and were invalidating the window on
every mouse except for those over text with a hyperlink.
2021-02-13 08:49:09 -08:00