1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-28 01:06:37 +03:00
Commit Graph

2802 Commits

Author SHA1 Message Date
Wez Furlong
fc24528f21 wezterm: update conpty and openconsole
These were build from this version: https://github.com/microsoft/terminal/releases/tag/v1.4.3141.0
2020-11-12 22:06:02 -08:00
Wez Furlong
04218bb877 termwiz: fixup sixel width calculation
@yoichi reports that:

```bash
printf "\x1bPqh"
```

would panic wezterm; the issue was that the maximum x value was
only being updated for newlines and that sequence didn't include it.

refs: #217
2020-11-12 10:01:33 -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
72492c1517 font: tidy up imports/exports a bit 2020-11-11 20:31:26 -08:00
Jeremy Fitzhardinge
cb6b1496bf Don't hard-code architecture in debian package 2020-11-11 20:31:18 -08:00
Jeremy Fitzhardinge
7bfe83da6b libpng: build NEON support for ARM and Aarch64 targets 2020-11-11 20:31:18 -08:00
Jeremy Fitzhardinge
e95c7ad855 Fix compiler warning by moving x86-64 specific variable into the guard 2020-11-11 20:31:18 -08:00
Jeremy Fitzhardinge
bf962c8b1a Use right char type for ffi binding
On aarch64, `char` is unsigned (unlike x86-64 where it's signed), so use
`c_char` for the pointer so that it always matches the architecture.
2020-11-11 20:31:18 -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
3d0107cb75 term/termwiz: add Cell::semantic_type
This commit allows the terminal to tag cells with their semantic
type, as defined by OSC 133 escape sequences.

The gist of it is that each cell is now semantically one of:

* Output (eg: from the activity performed by the user. This is the
  default)
* Input (eg: something that the user typed as input)
* Prompt (eg: "uninteresting" chrome/UI from the shell)

The semantic type is applied almost exactly like an SGR attribute,
except that resetting SGR doesn't clear the semantic type.

Tagging the cells in this way allows for smarter UX in the future;
for example, selecting the entire input or output from the last
command without fiddling around to avoid the prompt line(s),
or "paging up" to a prior prompt rather than page.

This doc covers those escapes as used in domterm, iterm2 and other
terminals:
https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposals/semantic-prompts.md

This is an example of how to configure the shell to emit these
sequences; I'll add a proper little blob of shell specifically
for wezterm in a later commit:
https://github.com/PerBothner/DomTerm/blob/master/tools/shell-integration.zsh
2020-11-07 11:54:22 -08:00
Wez Furlong
d896fa02b0 termwiz: add OSC 133 Semantic Marker sequences
These are proposed in a spec here:
https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposals/semantic-prompts.md

but are also used by iTerm2 in its shell integration here:
https://iterm2.com/documentation-shell-integration.html

This commit just teaches termwiz how to encode/decode the
OSC sequences.
2020-11-07 11:54:22 -08:00
Jeremy Fitzhardinge
81d5a92b66 Build fix for no implementation for &[u8] == std::vec::Vec<u8>`
Full error
```
error[E0277]: can't compare `&[u8]` with `std::vec::Vec<u8>`
   --> wezterm-gui/src/gui/termwindow.rs:817:40
    |
817 |                     if existing.data() == data {
    |                                        ^^ no implementation for `&[u8] == std::vec::Vec<u8>`
    |
    = help: the trait `std::cmp::PartialEq<std::vec::Vec<u8>>` is not implemented for `&[u8]`

error: aborting due to previous error
```
2020-11-07 07:48:21 -08:00
Wez Furlong
5b8b41adbb window: macos: fix mouse cursor for dragging splits 2020-11-06 15:02:38 -08:00
Wez Furlong
b860c9dbda termwiz: avoid panic for some malformed escapes 2020-11-06 13:59:04 -08:00
Wez Furlong
1dfc06febb docs: changelog for the last couple of fixes 2020-11-03 09:10:55 -08:00
Wez Furlong
cfef4fd0ca wezterm: adjust pixel width and height when dragging splits
The drag would update the cell dimensions but not the pixel dimensions,
which results in weird image scaling.

refs: #312
2020-11-02 19:56:46 -08:00
Wez Furlong
7fb22d6968 term: correct cursor position after imgcat
I've had a FIXME in here for a while to check the positioning,
but never got around to it.

The onefetch folks have an app that does care about this,
so it's time to resolve it!

This commit adjusts the cursor position for the iterm case
(not the sixel case), and results in both:

running in xterm:

```
onefetch --image ~/Downloads/squirrel.png
```

running in wezterm:

```
TERM_PROGRAM=iTerm.app onefetch --image ~/Downloads/squirrel.png --image-backend=iterm
```

```
onefetch --image ~/Downloads/squirrel.png --image-backend=sixel
```

showing consistent positioning.

refs: https://github.com/wez/wezterm/issues/317
refs: https://github.com/o2sh/onefetch/pull/305
2020-11-02 18:06:05 -08:00
Wez Furlong
500bf1b376 docs: note about #316
refs: #316
2020-11-01 10:36:33 -08:00
Wez Furlong
403d002d0a window: fix potential crash with multiple egl windows on windows
I didn't actually see this crash, but the same potential problem
was present, so adjust the code as per 9712d4d03c

refs: #316
2020-11-01 10:28:17 -08:00
Wez Furlong
9712d4d03c window: fix crash with multiple egl windows on macos
This is basically the same issue as
70fc76a040 but on macOS.   Now that we're
using EGL in more places, the same sort of check needs to used in more
places!

Will need to do the same on Windows in a follow-up commit.

refs: #316
2020-11-01 10:18:40 -08:00
Wez Furlong
bb49ecca98 docs: update for 20201031-154415-9614e117 release 2020-10-31 15:51:08 -07:00
Wez Furlong
9614e117e0 term: restore original resize behavior on Windows
This reverts to the original resize behavior of padding out
the display when resizing taller, but only for Windows systems.

More explanation in the comments in the code.

refs: #138
2020-10-31 11:58:15 -07:00
Wez Furlong
b239801085 wezterm: fixup wezterm ssh host
Needed to re-order a couple of things to match recent changes.

Also: don't hard fail if the ssh server rejects a setenv request,
just log the error instead.
2020-10-31 11:45:30 -07:00
Wez Furlong
5619eb718c wezterm: default inactive_pane_hsb to dim/desaturate
Let's make the suggested config in the docs the default
and dim/desaturate inactive panes slightly.
2020-10-30 23:12:35 -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
a725dd3050 ci: add mux-server to brew tap install 2020-10-30 22:20:02 -07:00
Wez Furlong
0547fbb549 ci: set release as pre-release when tagging
also looks like I missed updating the source tarball
generation step in a prior adjustment.
2020-10-30 22:09:58 -07:00
Wez Furlong
863a64cea2 docs: reorder and refine changelog items 2020-10-30 21:09:35 -07:00
Wez Furlong
ab0a4fc2d2 mux: fix initial creation of pid file in mux server
We need to create the directory structure that we want to place
the pid file into.
2020-10-29 21:07:49 -07:00
Jun Wu
ebd4f4aa06 lineedit: add a way to render previews
Make it possible to implement rendering previews in new lines, seen in
nodejs [1]. The preview is cleared when the line is accepted (Enter)
or canceled (Ctrl+C).

[1]: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#repl-previews
2020-10-29 08:56:30 -07:00
Wez Furlong
75ce0fc822 term: improve cursor/viewport positioning on resize
This seems to make our resize behavior a bit nicer and more
consistent with eg: xterm.

Previously we'd consider the previously existing scrollback
as immutable and prefer to add excess blank lines of padding
when making the window taller.

In practice that meant that content would scroll back when
making the window taller, which is annoying.

This commit removes that constraint and instead will prefer
to maintain the cursor position relative to the top of the
viewport when the size changes.

refs: #138
2020-10-28 22:50:50 -07:00
Wez Furlong
92bdc4a3b0 Revert "window: alternative shadow/ghost/macos fix"
This reverts commit f2b504ee1f9a607fe8965e96b659bca282147672;
we prefer the overall snappier perf from not having a shadow.

refs: #310
2020-10-28 17:55:15 -07:00
Wez Furlong
f2b504ee1f window: alternative shadow/ghost/macos fix
This one invalidates the shadow when we invalidate the window,
so we should get to keep the shadow and lose the ghosts.

refs: #310
2020-10-28 16:08:33 -07:00
Wez Furlong
e3100c937f window: maybe fix ghostly artifacts on macos
Not 100% sure that this is it, but it seems much less likely that
artifacts will appear in conjunction with transparency when the window
shadow effect is disabled; I didn't see the ghosting with this disabled,
but I sometimes dididn't see it with it enabled, so I'm not sure that we
have a 100% reliable reproduction, and thus am not sure that this is a
fix.

I found mention of disabling the shadow in some example code on
stackoverflow when I was first researching this, but it wasn't supplied
with an explanation. Perhaps this is why?

Longer term we might want to be smarter about turning off the shadow
only when the opacity is != 1.0, but at the moment the window layer
can't see the config, so let's just default it off for the moment
until we see if it does the trick.

refs: #310
2020-10-28 14:08:04 -07:00
Wez Furlong
3808cf3f58 wezterm: fixup overall background color
When padding was set, it was being overwritten by black whitespace
unconditionally.  This fixes that.

refs: #309
2020-10-27 22:09:03 -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
42aeb6f11b wezterm: retry initial texture allocation
A consequence of reducing the initial texture size is that for
larger starting font sizes it isn't big enough.  We need to make
a couple of passes to determine the required size, so that's
what this commit does.

refs: #307
2020-10-25 16:09:47 -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
dab2dd5025 term: cache recently decoded images
This commit introduces a small, bounded, LRU cache for recently
decoded images.

This allows the same image ID to be used in the cache that the
same image bits are repeatedly sent to the terminal.

This is advantageous because it reduces the amount of texture
space required by the gui layer.
2020-10-25 11:59:44 -07:00
Wez Furlong
198c40103b wezterm: fix iterm2/sixel images rendering in wrong pane
The quad selected for the image cells didn't account for
the pane origin.
2020-10-25 10:30:15 -07:00
Wez Furlong
f8c35f191b wezterm: add env bootstrap to mux server, too 2020-10-24 23:33:31 -07:00
Wez Furlong
83d604fe29 wezterm: .desktop launches wezterm
I changed this to `wezterm-gui` thinking it would be a hair more
efficient, but it makes it difficult to access the cli side of
things from the appimage.
2020-10-24 23:25:48 -07:00
Wez Furlong
21dbeb6f83 wezterm: fixup APPIMAGE environment consistently
Need to apply the same logic in wezterm-gui as we do
in the wezterm-cli.
2020-10-24 23:21:03 -07:00
Wez Furlong
ea0d8d6f11 wezterm-font: remove font-kit dep
This wasn't used by anything and the version was getting pretty stale.
Upgrading is awkward because newer versions pull in an incompatible
freetype library version.
2020-10-24 22:01:00 -07:00
Wez Furlong
284a4ebfbb window: fix mouse wheel reporting on Windows
Wheel events wouldn't get reported to eg: vim in wsl if the
window's X position was larger than the window width due to
mouse wheel messages being reported with screen coordinates
rather than client coordinates.

This commit addresses that.
2020-10-24 21:41:11 -07:00
Wez Furlong
89257c73bb wezterm: a few more wezterm-gui fixups
These parts of packaging are likely sensitive to the change also
2020-10-24 17:17:45 -07:00