1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-01 00:35:46 +03:00
Commit Graph

618 Commits

Author SHA1 Message Date
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
720a6fd9b6 wezterm: fixup dark edges on text
9892b16d40 adjusted how the text
colors are produced; it resulted in some ugly dark edges, especially
on lighter backgrounds.

This commit routes that tint via an alpha compositing helper which
produces smoother edges.

refs: #320
2020-11-15 15:17:23 -08:00
Wez Furlong
9892b16d40 wezterm-font: tidy up some font hinting/aa options
This commit more cleanly separates the load from the render flags,
and fixes up the render call; at some point this got messed up such
that we'd never end up with freetype returning subpixel format data
(LCD) and instead we'd only ever get grayscale data.

With that fixed, it's apparent that the colorization of the glyph
data was wonky in the shader so this commit also cleans this up.

refs: #320
refs: #121
2020-11-14 17:27:31 -08:00
Wez Furlong
bc1e12e0f5 wezterm: fix scaling of color emoji
If you have a primary font whose height is a bit more than double the
width then a double-wide emoji would be scaled to a bit more than two
cells in width.

This commit adjust the glyph scaling to check both the x and y scaling
to ensure that they glyph fits within the appropriate number of cells.

This has the consequence of rendering eg: the heart emoji smaller than
in previous versions; the heart glyph is typically square but the
broadly used concept of width for the heart unicode character is a
single cell.  Previously we'd incorrectly render this double wide.
I'm not sure of a way to do better than we are right now because
freetype doesn't provide much help for scaling this kind of bitmap
font AFAICS.

refs: #320
2020-11-14 13:43:30 -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
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
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
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
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
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
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
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
442c9a26d1 wezterm-gui: partial revert of 91ce0b77ea
Apparently macOS/ANGLE doesn't like the shader changes, so
roll them back.

refs: #292
2020-10-24 16:47:38 -07:00
Wez Furlong
7e8c5a06bb split gui into wezterm-gui executable
This commit moves a bunch of stuff around such that `wezterm` is now a
lighter-weight executable that knows how to spawn the gui, talk to
the mux or emit some escape sequences for imgcat.

The gui portion has been moved into `wezterm-gui`, a separate executable
that doesn't know about the CLI or imgcat functionality.

Importantly, `wezterm.exe` is no longer a window subsystem executable
on windows, which makes interactions such as `wezterm -h` feel more
natural when spawned from `cmd`, and should allow
`type foo.png | wezterm imgcat` to work as expected.

That said, I've only tested this on linux so far, and there's a good
chance that something mac or windows specific is broken by this
change and will need fixing up.

refs: #301
2020-10-24 16:40:15 -07:00