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

8 Commits

Author SHA1 Message Date
Wez Furlong
b7771feef6
imgcat: work better with tmux and conpty
Neither of these understand image protocols, and both are
an additional processing layer between the application and
wezterm.

This commit detects and wraps OSC sequences in tmux's passthru
sequence so that the data is passed on to wezterm rather than
elided from the data stream.

For image protocols in both tmux and conpty, work a little
smarter and explicitly move the cursor position to the same
location that wezterm would move it to.  That prevents the
display from being as mangled by tmux/conpty due to a diverging
understanding of the cursor position.

The logic isn't perfect, and can result in the x-coordinate
being incorrect, and this won't work with the new --position
argument either in its current state, without adding a lot
of complexity to deal with scrolling and relative and absolute
positioning handling.

To facilitate that, a new termwiz Terminal trait method has
been added to probe the terminal name, version, cell and pixel
dimensions. It's not pretty.

refs: https://github.com/wez/wezterm/issues/3624
refs: https://github.com/wez/wezterm/issues/3716
2023-07-15 22:13:19 -07:00
Wez Furlong
2bfb29f1be
improve handling of animated webp images
Use mainline image crate to avoid an otherwise unavoidable panic
in the upstream: https://github.com/image-rs/image/issues/1775

Explicitly operate on the frames from the animation.

refs: https://github.com/wez/wezterm/issues/3250
2023-03-15 11:34:47 -07:00
Wez Furlong
cab7feb48c deps: update serde_yaml 2022-07-31 20:37:19 -07:00
Wez Furlong
548adf484b add wezterm.color.get_default_colors 2022-07-14 21:41:39 -07:00
Wez Furlong
810512c2c5 colors: refine importer
Adjust importer to read directly from the source .itermcolors
files in the upstream repo.  Extract some author information
from the comments in those files.

All data is now fetched (and cached!) via relatively minimal
http requests rather than requiring a git repo locally.

Also search for .yml files in base16 repos; found another
couple of schemes this way.

The toml files under assets/colors are no longer read by
anything in the repo. I plan to remove them, but since the
docs reference them as examples, I will first ensure that
there are docs and tooling that explains how to write and
share your own scheme files.
2022-07-14 00:14:16 -07:00
Wez Furlong
222853bdc5 color schemes: move other color scheme format code to color-funcs
I want to add lua funcs for importing schemes; this is a step towards
that.
2022-07-13 21:29:51 -07:00
Wez Furlong
c8ca2054f6 lua: add wezterm.color.extract_colors_from_image
This function can be used to extra distinct colors from
an image to be fed into eg: color scheme generation.
2022-07-11 17:46:36 -07:00
Wez Furlong
463ca2fa29 add wezterm.color module for working with colors
wezterm.color.parse() returns a color object that can be assigned in the
wezterm color config, and that can be used to adjust hue, saturation and
lightness, as well as calculate harmonizing colors (complements, triads,
squares) from the RGB/HSL color wheel.
2022-07-10 23:41:18 -07:00