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

507 Commits

Author SHA1 Message Date
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
Wez Furlong
475260d3e3 Update bundled JetBrainsMono font to 2.225
refs: #452
2021-02-11 23:56:07 -08:00
Wez Furlong
6fbc54b93d docs: break out allow_square_glyphs_to_overflow_width separately
move this to is own file in the docs

refs: #462
2021-02-11 23:35:09 -08:00
Wez Furlong
ece9276624 term: large pastes could hang the terminal
Pasting a lot of text could cause a deadlock between writing
to the input side of the pty and consuming the output side.

Making the writer/input side non-blocking resolves this.
2021-02-11 23:32:19 -08:00
Wez Furlong
561feaa710 Update docs/config/lua/config/show_update_window.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
2021-02-11 23:32:07 -08:00
Benoit de Chezelles
2a5118f002 docs: Extract check_for_updates* & show_update_window from misc 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
9298c0e450 doc: Update scroll_to_bottom_on_input description 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
a54c6b2dfd Extract some added options doc to individual files 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
6e58681f7e Add missing doc for selection_word_boundary 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
4762d80c81 Add missing doc for scroll_to_bottom_on_input 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
2da019877e Add missing doc for show_update_window 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
e599c08fd3 Add missing doc for allow_square_glyphs_to_overflow_width 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
dca9fa4ae0 Add missing doc for check_for_updates{,_interval_seconds} 2021-02-11 23:32:07 -08:00
Benoit de Chezelles
f47c736e42 Add missing doc for automatically_reload_config 2021-02-11 23:32:07 -08:00
Muhammed Zakir
fd480da550 Fix typo
"will will" -> "you will"
2021-02-11 21:42:18 -08:00
Benoit de Chezelles
adc454ec90 Add missing dots 2021-02-07 18:57:06 -08:00
Benoit de Chezelles
94d0a4d8b7 document Ctrl-u in search mode 2021-02-07 18:57:06 -08:00
Wez Furlong
04bbfb4760 docs: changelog and a little extra info about --config-file
refs: 459
2021-02-07 09:31:41 -08:00
Wez Furlong
70cb992924 config: improve font_rule synthesis
This should help to avoid frustration for minor config issues.

closes: https://github.com/wez/wezterm/issues/456
2021-02-06 08:23:22 -08:00
Benoit de Chezelles
34ccb66464
Update ClearScrollback default value (#458) 2021-02-05 13:10:08 -08:00
Wez Furlong
aa75dda157 docs: note 413 in the changelog
refs: https://github.com/wez/wezterm/issues/413
2021-02-04 08:42:54 -08:00
Wez Furlong
8ee11484b9 update for rename of master branch -> main 2021-02-03 21:34:12 -08:00
Wez Furlong
a034730373 docs: clarify about M1 binary for macos 2021-02-03 11:24:41 -08:00
Wez Furlong
32b2bd446d docs: update for 20210203-095643-70a364eb release 2021-02-03 10:03:04 -08:00
Wez Furlong
5c41afacce docs: remove lua syntax highlighting hack
The updated mdbook bits already include this, and our hack resulted
in disabling lua highlighting.
2021-02-01 08:12:21 -08:00
Wez Furlong
f541e923de macos: also respect use_dead_keys = false
refs: #410
2021-01-31 17:32:11 -08:00
Wez Furlong
6bfadfac0a macos: handle dead keys without IME
Dead key processing respects the
`send_composed_key_when_left_alt_is_pressed` and
`send_composed_key_when_right_alt_is_pressed` options.

See doc changes included in this commit for more info.

refs: https://github.com/wez/wezterm/issues/410
2021-01-31 17:06:30 -08:00
Wez Furlong
df3387e12c wezterm: change default copy/paste behavior on X11
This commit changes mouse-based selection and middle click to use the
PrimarySelection.

CTRL-SHIFT-{C,V} use Clipboard.

{SHIFT,CTRL}-Insert use PrimarySelection.

`CompleteSelection` and `CompleteSelectionOrOpenLinkAtMouseCursor` now
require a parameter to specify the destination clipboard.

Removed the `default_clipboard_XXX` options added in
8dad34fa61 in favor of just explicitly
assigning the key/mouse bindings.

closes: #417
2021-01-31 09:28:42 -08:00
Wez Furlong
9a610358d1 docs: upgrade to mdbook 0.4, enable link checking
Standardize on `thing.md` rather than `thing.markdown` to make it
easier to cross link.
2021-01-30 14:14:29 -08:00
Wez Furlong
089aae3a76 docs: put default_clipboard_paste_source.md in the right dir 2021-01-30 11:50:04 -08:00
Wez Furlong
d10f7bbb1b wezterm: add alternate_buffer_wheel_scroll_speed option and increase to 3
More details in the included docs.

closes: #432
2021-01-30 10:14:01 -08:00
Wez Furlong
a8d4743e03 docs: fix typo: default_paste_source -> default_clipboard_paste_source
This was a tab-complete-o
2021-01-30 09:42:36 -08:00
Wez Furlong
cf9195da0f docs: changelog for #446 2021-01-30 08:46:36 -08:00
Wez Furlong
1c0bcecd26 docs: changelog and thanks for drop shadow change
refs: #445
2021-01-30 08:05:55 -08:00
Wez Furlong
28b1ec879a docs: switch links to new matrix room 2021-01-27 13:30:36 -08:00
Wez Furlong
8dad34fa61 more configuration options for Copy/Paste
* Adds `CopyTo` and `PasteFrom` assignments that specify the
  destination/source.
* Adds `default_clipboard_copy_destination` and `default_paste_source`
  config options that specify the default destination/source for
  existing `Copy` and `Paste` operations (for @bew)
* Deprecating `PastePrimarySelection` in favor of `PasteFrom`.
* Added `CTRL-Insert` -> `Copy` (for @Babar)

Aside from the new key assignment, these changes shouldn't change
the default behavior, but do make it easier to consider changing
that in a later commit.

They should allow for example:

* Set `default_clipboard_copy_destination = "PrimarySelection"` to
  prevent populating the clipboard by default when using the mouse.
* Overriding the CTRL-Insert, CTRL-SHIFT-C to explicitly populate
  the clipboard
* Set `default_paste_source = "PrimarySelection"` for middle click
  to paste the selection.
* Overriding SHIFT-Insert, CTRL-SHIFT-V to explicitly paste from
  the clipboard.

refs: #417
2021-01-27 10:20:17 -08:00
Wez Furlong
00b578137d indicate that this was added in nightly 2021-01-26 12:17:26 -08:00
Wez Furlong
82c53c2b7f Add changelog for default_cwd and another link to the neat flow chart
refs: #428
2021-01-26 12:05:18 -08:00
Dylan Frankland
3793ff2587
Add config option to specify default current working directory (#438)
* Add config option to specify default current working directory

* Make `cwd` of CLI take precedence over `default_cwd`

* Update docs for `default_cwd` and Launching Programs

Explains the `default_cwd` property more succinctly on the `Config` struct.

Adds documentation on the various ways to set the working directory and the logic used to decide the working directory.
2021-01-26 10:40:22 -08:00
Wez Furlong
63abfd4bef docs: changelog and tweak ClearScrollback docs
... to show that they were introduced in the nightly builds.

refs: #439
2021-01-25 21:33:28 -08:00
Dylan Frankland
88f44f5b5f
Add erase mode to ClearScrollback action (#439)
* Add ClearBuffer action

Clears all lines, both visible and those scrolled off the top of the viewport, making the prompt line the new first line and resetting the scrollbar thumb to the full height of the window.

This is the behavior that Hyper / xterm has for clearing the terminal.

* Combine ClearBuffer into ClearScrollback as enum with associated erase mode

Makes it easier to manage the different options of clearing the terminal.
2021-01-25 21:26:23 -08:00
Olivier Raginel
914c10c507 Fix typo: Fedora33 not 32 2021-01-25 18:42:37 -08:00
Wez Furlong
6c08f463f3 docs: add unix_domains entry 2021-01-19 21:01:14 -08:00
Wez Furlong
fc6f529ee5 docs: start adding a reference section for Config 2021-01-18 17:31:39 -08:00
Wez Furlong
dc1f64ad39 docs: fix rendering for selection_word_boundary 2021-01-18 16:36:57 -08:00
Wez Furlong
7885c375b2 docs: adjust escape sequence page wording a bit 2021-01-18 16:34:52 -08:00
Wez Furlong
0e2fc6ea4c docs: add changelog for paste behavior on Windows
refs: https://github.com/wez/wezterm/issues/411
2021-01-18 16:29:04 -08:00
Wez Furlong
2b29c7dcbd docs: fix padding on logo 2021-01-18 14:57:18 -08:00
Wez Furlong
85e8a54076 docs: put logo on the index page too 2021-01-18 14:54:41 -08:00
Wez Furlong
6cce9cb1cd docs: changelog entry about metalangle no longer being shipped 2021-01-18 14:49:14 -08:00
Wez Furlong
89c1ac5b4c wezterm: add adjust_window_size_when_changing_font_size option
The default is true, which means that adjusting the font size will
cause the window to resize to preserve the number of rows/cols in
the terminal.

When set to false, the window size is preserved and the number of
terminal rows/cols is adjusted instead.

refs: https://github.com/wez/wezterm/issues/431
2021-01-18 13:23:02 -08:00
Wez Furlong
b60e83b22b docs: start documenting supporting escape sequences
I started this a while ago; it's pretty time consuming to produce
accessible and usable documentation for this sort of stuff, so
this isn't yet complete, but in the interest of avoiding additional
bit-rot, let's get this up.

refs: https://github.com/wez/wezterm/issues/257
2021-01-18 11:16:18 -08:00
Wez Furlong
aee37784e5 Windows: fix initial window size when display scaling != 100%
The heart of this issue was that the resize callbacks have two
layers of state; one in the low level window and one in the application
level window.

On Windows, the system triggers the low level callback prior to
opengl being initialized.  Since the application level depends on
the opengl state, there are some code paths where it NOPs and
returns early if opengl isn't yet initialized.

When the system-wide display scaling is set to say 200%, the application
layer can't know the effective DPI of the window it is creating because
it doesn't know which monitor will be used or what its DPI will be.

New windows are created at the default DPI of 96, and we rely on the
resize events to detect the actual DPI and adjust the scaling in
the window.

The early call of the resize callback meant that the low level and
application level size/dpi state was out of sync and the result was
that the window had half as many pixels as it should, but that the
terminal model was still sized as though it had the correct amount
(twice as many as visible).  This resulted in the window being too
small for the viewport.

The resolution is simple: we now suppress emitting the resize processing
until opengl has been initialized.

The test scenario for this is:

* Set system scaling to 100%
* Launch wezterm
* Set system scaling to 200%
* Observe that wezterm scales to match
* Press CTRL-SHIFT-N to spawn a new window
* Observe that the new window size matches the other window (previously
  this one would be half the size)

While I was looking at this, I noticed that the manifest didn't
match the DPI awareness that we have in the code, so update that.

refs: https://github.com/wez/wezterm/issues/427
2021-01-18 09:27:04 -08:00
Wez Furlong
83dbf03db8 docs: note about fullscreen mode support
refs: https://github.com/wez/wezterm/issues/177
2021-01-17 23:49:46 -08:00
Wez Furlong
d108af980f docs: fix link to undercurl 2021-01-17 23:41:17 -08:00
Wez Furlong
175fc0d6dd docs: add a note on undercurl 2021-01-17 23:21:26 -08:00
Wez Furlong
da3a41e018 wezterm: fix mapping scroll wheel to cursor up/down in alt screen
This appears to have been broken since the introduction of mouse
assignments :-/

This commit adds Pane::is_alt_screen_active so that the gui layer
can tell whether the alt screen is active, and allow passing down
the event.

refs: #429
2021-01-17 21:44:02 -08:00
Wez Furlong
2cb1fb9751 docs: changelog entry for #428
refs: #428
2021-01-17 11:54:43 -08:00
Wez Furlong
42b95cd413 ci: generate universal binaries for macOS
This persuades the CI to install both the arm and intel flavors
of the rust toolchain on macOS, and the deploy script to generate
a universal binary.

* need big sur to build for M1
* Use cross-compilation compatible mlua from my fork for now
2021-01-13 20:11:58 -08:00
Wez Furlong
5fb0c05541 Add changelog entry for umask issue
refs: #416
2021-01-07 09:37:27 -08:00
Wez Furlong
704dd9aa44 revise changelog for undercurl
refs: https://github.com/wez/wezterm/issues/415
2021-01-06 22:50:45 -08:00
Wez Furlong
387b3487aa docs: changelog for undercurl
refs: https://github.com/wez/wezterm/issues/415
2021-01-06 00:25:04 -08:00
Wez Furlong
386032bdee docs: fix custom event example 2021-01-01 20:07:46 -08:00
Wez Furlong
cf2dcff362 changelog: note about not leaking fds from gnome, too 2020-12-29 11:37:53 -08:00
Wez Furlong
6578d657b3 add ` to the default selection_word_boundary config 2020-12-29 11:34:55 -08:00
Wez Furlong
ba62f4fed0 clarify split docs
I've seen a number of people copy and paste the example that runs
`top` and be confused by it, so try to make it a bit clearer how
to get a regular split with a shell inside it.
2020-12-29 08:40:52 -08:00
Wez Furlong
da55e12b5e Add selection_word_boundary configuration option
refs: https://github.com/wez/wezterm/issues/405
2020-12-28 14:13:25 -08:00
Wez Furlong
94ca16d987 gui: round x-coordinate when selecting text
But don't round the y-coordinate as that one seems OK.

refs: https://github.com/wez/wezterm/issues/350
2020-12-28 13:44:30 -08:00
Wez Furlong
4d8cc1bb26 font: consider "random" glyphs when computing metrics for symbol fonts
If a font doesn't have any latin glyphs then we'd compute 0 as the
average width.  Later, during rendering, we'd compute an `inf` scaling
factor and then subsequently fail to allocate texture space.

This commit takes the average width from a "random" selection of glyphs
(whatever the first few glyphs in the font may be) to avoid that
situation.

refs: https://github.com/wez/wezterm/issues/404
2020-12-28 09:02:30 -08:00
Wez Furlong
586d18c9fd QuitApplication now respects window_close_confirmation
closes: https://github.com/wez/wezterm/issues/398
closes: https://github.com/wez/wezterm/issues/280
2020-12-26 15:37:41 -08:00
Wez Furlong
3d9f341e00 docs: tweak mdbook config
* Sets wezterm's icon as the favicon
* enable github link back to the repo
* Default to Ayu color scheme
2020-12-26 10:05:39 -08:00
Wez Furlong
da00e091b6 docs: changelog entry about SHIFT on X11
refs: https://github.com/wez/wezterm/issues/394
2020-12-25 22:53:52 -08:00
Cindy Xiao
4ce0397ddb
docs: update default keybinding info for CloseCurrentTab w/ its boolean param (#396)
CloseCurrentTab now takes a boolean parameter (confirm), but the default
keybinding table in the docs hasn't been updated to reflect that.
2020-12-25 22:43:58 -08:00
Wez Furlong
79c945a893 Probably improve compatibility for AltGr inside VNC on Windows
I didn't recreate precisely the situation in the issue, but I
tried pressing both `AltGr 8` and `CTRL ALT 8` with a DEU
layout active and both now result in `[` being emitted.

refs: #392
2020-12-24 16:23:12 -08:00
Wez Furlong
c66e8f5c5e use $WEZTERM_LOG to configure log levels ad-hoc
80214319ae broke the use of RUST_LOG to
turn up trace logging.

This commit refactors logger initialization into the env-bootstrap crate
so that it is centralized, and adopts the use of `WEZTERM_LOG` to
override the default logging filters, rather than `RUST_LOG`.
2020-12-23 12:19:19 -08:00
Wez Furlong
5787bdff53 wezterm: closing a window now prompts for confirmation by default
Adds `window_close_confirmation = "AlwaysPrompt"` as the default
configuration.  Can be set to `NeverPrompt` to disable prompting.
2020-12-23 09:58:38 -08:00
Wez Furlong
2c18a408c3 docs: fix docs to show the default inactive_pane_hsb value 2020-12-23 08:51:25 -08:00
Wez Furlong
2356be0cc2 fonts: default to Greyscale antialiasing
The font rendering changes make Subpixel look a bit anemic in
comparison to prior releases, so let's make the default Greyscale.
2020-12-22 10:09:06 -08:00
Wez Furlong
a4d64d3bdd docs: note NSCursor selector issue in the changelog
This was fixed in 5b8b41adbb

refs: #391
2020-12-21 22:27:49 -08:00
Wez Furlong
0ae494fb94 config: add line_height config option
The default is 1.0.  `line_height` is used to scale the effective
cell height, increasing the amount of space between font baselines.

refs: https://github.com/wez/wezterm/discussions/387
2020-12-20 14:33:18 -08:00
Wez Furlong
d62433eed7 changelog entry for color cube adjustment
closes: https://github.com/wez/wezterm/issues/348
2020-12-19 14:09:37 -08:00
Wez Furlong
592dbffa22 pty: avoid leaking random fds to children on macOS Big Sur
I'm assuming this is Big Sur specified, as I hadn't noticed
this until upgrading; there are a bunch of gui related files
inherited by my shell:

```
$ lsof -p $$
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF                NODE NAME
zsh     66016  wez  cwd    DIR   1,16     1760              396092 /Users/wez/wez-personal/wezterm
zsh     66016  wez  txt    REG   1,16  1331248 1152921500312774717 /bin/zsh
zsh     66016  wez  txt    REG   1,16   138640 1152921500312777271 /usr/lib/zsh/5.8/zsh/terminfo.so
zsh     66016  wez  txt    REG   1,16   174352 1152921500312777285 /usr/lib/zsh/5.8/zsh/zutil.so
zsh     66016  wez  txt    REG   1,16   138128 1152921500312777261 /usr/lib/zsh/5.8/zsh/rlimits.so
zsh     66016  wez  txt    REG   1,16   579888 1152921500312777275 /usr/lib/zsh/5.8/zsh/zle.so
zsh     66016  wez  txt    REG   1,16   341904 1152921500312777223 /usr/lib/zsh/5.8/zsh/complete.so
zsh     66016  wez  txt    REG   1,16   174752 1152921500312777257 /usr/lib/zsh/5.8/zsh/parameter.so
zsh     66016  wez  txt    REG   1,16   211584 1152921500312777225 /usr/lib/zsh/5.8/zsh/complist.so
zsh     66016  wez  txt    REG   1,16   208768 1152921500312777227 /usr/lib/zsh/5.8/zsh/computil.so
zsh     66016  wez  txt    REG   1,16  2528384 1152921500312776994 /usr/lib/dyld
zsh     66016  wez    0u   CHR   16,1 0t158834                1019 /dev/ttys001
zsh     66016  wez    1u   CHR   16,1 0t158834                1019 /dev/ttys001
zsh     66016  wez    2u   CHR   16,1 0t158834                1019 /dev/ttys001
zsh     66016  wez    8r   REG   1,16   273022 1152921500312217452 /System/Library/Extensions/AppleMetalGLRenderer.bundle/Contents/Resources/default.metallib
zsh     66016  wez   10u   CHR   16,1  0t20923                1019 /dev/ttys001
zsh     66016  wez   11u   REG   1,16    65536              576611 /private/var/folders/mg/hk5n1_9x7014sm0syzqzzn640000gn/C/com.github.wez.wezterm/com.apple.metal/16777235_322/functions.data
zsh     66016  wez   12u   REG   1,16     1276             2360034 /private/var/folders/mg/hk5n1_9x7014sm0syzqzzn640000gn/C/com.github.wez.wezterm/com.apple.metal/16777235_322/functions.list
zsh     66016  wez   13r   REG   1,16   215992             2354718 /Library/Application Support/CrashReporter/SubmitDiagInfo.domains
zsh     66016  wez   14u   REG   1,16     5232             2360053 /Users/wez/Library/Saved Application State/com.github.wez.wezterm.savedState/window_2.data
zsh     66016  wez   15u   REG   1,16    59040             2360054 /Users/wez/Library/Saved Application State/com.github.wez.wezterm.savedState/data.data
zsh     66016  wez   16w   REG   1,16     4716             2360055 /Users/wez/Library/Saved Application State/com.github.wez.wezterm.savedState/windows.plist
```

This commit iterates the list of open descriptors just prior
to calling exec and closes any that aren't the stdio (0-2) descriptors.
2020-12-19 14:01:39 -08:00
Benoit de Chezelles
380f83e7df
Update matrix room url (#378)
* Update matrix room url

* Update matrix room url everywhere :D
2020-12-13 10:06:52 -08:00
Wez Furlong
2603f9d4b4 fixup mux output processing
in ab342d9c46 I started to rearrange how
the output processing thread works.  It wasn't quite right, so this
commit tidies things up.

The main change here is that there is now back-pressure from the output
parser on the reader; if it is taking a while to parse the output then
we don't buffer up so much input.

This makes operations like `find /` followed immediately by `CTRL-C`
more responsive.

With this change, I don't feel that the
`ratelimit_output_bytes_per_second` option is needed any more, so it
has been removed.
2020-12-12 08:53:45 -08:00
Wez Furlong
8f5b5b572e ci: ubuntu 19 is EOL 2020-12-10 19:53:34 -08:00
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
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
Wez Furlong
99b8fb2612 wezterm: add tab_max_width config option
This allows setting the maximum width of a tab in the tab tab.
It defaults to 16 glyphs in width.

refs: https://github.com/wez/wezterm/issues/255
2020-08-29 10:45:01 -07:00
Wez Furlong
70fc76a040 window: fix segv when using multiple egl windows with linux/X11
This could be reproduced via `wezterm connect localhost`.
This bug was surfaced after the last release added a Drop impl
to cleanup the display.

This commit tracks the display in the connection.

closes: https://github.com/wez/wezterm/issues/252
2020-08-16 10:43:14 -07:00
Wez Furlong
5457c09590 wezterm: enable_wayland = false by default
refs: https://github.com/wez/wezterm/issues/224
2020-08-16 09:50:00 -07:00
Wez Furlong
5de6e88a68 docs: changelog update for nightly builds 2020-08-16 09:44:14 -07:00
Wez Furlong
0c7945792d docs: more SendString
Bleh, forgot to amend this before pushing the last commit.

closes: https://github.com/wez/wezterm/issues/253
2020-08-16 08:28:45 -07:00
Wez Furlong
609c707e91 docs: add example for SendString + escape sequences
closes: https://github.com/wez/wezterm/issues/253
2020-08-16 08:19:00 -07:00
Wez Furlong
cc9503120f docs: fix typo 2020-07-18 10:16:51 -07:00
Wez Furlong
f1dc2568f7 docs: add note about linuxbrew tap 2020-07-18 10:16:30 -07:00
Wez Furlong
cbc065cfd9 docs: fix link to color schemes 2020-07-18 10:06:38 -07:00
Wez Furlong
b3fad71768 docs: update for latest release 2020-07-18 10:05:31 -07:00
Wez Furlong
d23156403d Re-sync color schemes 2020-07-18 09:29:50 -07:00
Wez Furlong
bffcf9dbaf docs: add note about WGL fallback fix
closes: https://github.com/wez/wezterm/issues/235
2020-07-18 09:18:31 -07:00
Wez Furlong
b2aff76183 docs: add note about improved non-24bpp support
closes: https://github.com/wez/wezterm/issues/240
2020-07-18 09:14:17 -07:00
Wez Furlong
8f27301820 docs: add note about vim/rgb answerback bug
refs: https://github.com/wez/wezterm/issues/241
2020-07-18 09:10:57 -07:00
Wez Furlong
aff3b7028a docs: add note about pty fix
refs: https://github.com/wez/wezterm/pull/245
2020-07-18 09:08:10 -07:00
Wez Furlong
313690d484 docs: Add note about the bold color fix in openconsole.exe
refs: https://github.com/wez/wezterm/issues/244
2020-07-18 09:05:10 -07:00
Wez Furlong
1209cde2b1 Add bold_brightens_ansi_colors configuration option
refs: https://github.com/wez/wezterm/issues/244
2020-07-18 09:02:56 -07:00
Wez Furlong
b936e9685b docs: add some input troubleshooting info the FAQ
closes: https://github.com/wez/wezterm/issues/216
2020-06-25 07:15:57 -07:00
Wez Furlong
076cf3d177 wezterm: teach renderer about overline
This commit adds an overline glyph which is simply a line drawn at
the top of the cell.

Due to the way that we use a single glyph for the line layer, this
actually adds a handful of combination glyphs for the different
underline, overline and strikethrough possibilities.

It's getting a bit hefty.  Adding another similar attribute in
the future (eg: maybe wiggly underlines?) might prove to be too
much for the simple approach we have right now.

```bash
printf "\x1b[53moverline\x1b[0m\n"
```
2020-06-20 23:18:52 -07:00