The shared memory segment size must be a multiple of page size. This
means that it may be larger than our expected image size. In this case,
we trim the padding at the end.
This happened to work in releases somehow but Xcode debug builds would
catch this as an assertion. Our cell bg pipeline now uses the "full
screen vertex shader" which takes no parameters, so we don't need a
vertex descriptor.
Adds support for using shared memory to transfer images between
the CLI and Ghostty using the Kitty image protocol. This should be
the fastest way to transfer images if the CLI program and Ghostty are
running on the same system.
Works for single image transfer using `kitten icat`:
```
kitten icat --transfer-mode=memory images/icons/icon_256x256.png
```
However trying to play a movie with `mpv` fails in Ghostty (although it
works in Kitty):
```
mpv --vo=kitty --vo-kitty-use-shm=yes --profile=sw-fast --really-quiet video.mp4
```
`mpv` appears to be sending frames using the normal image transfer
commands but always setting `more_chunks` to `true` which results in an
image never being shown by Ghostty.
Shared memory transfer on Windows remains to be implemented.
- Significant changes to optimize memory usage.
- Adjusted formatting of the metal shader code to improve readability.
- Normalized naming conventions in shader code.
- Abstracted repetitive code for attribute descriptors to a helper
function.
These oses don't supply a tty layer, which prevents us from using the
libvaxis tty. Eventually we can add in using stdout as a writer. For
now, we just don't pretty print there.
Add pretty printing to the +list-keybinds command. This is done by
bringing in a dependency on libvaxis to handle the styling. Pretty
printing happens automatically when printing to a tty, and can be
disabled either by redirecting output or using the flag `--plain`
The case where the split if fully opaque (`unfocused-split-opacity = 1.0`) should result in the overlay being fully transparent (`opacity: 0.0`).
This would be consistent with how this is implemented in the macos app:
dcc492f19b/macos/Sources/Ghostty/Ghostty.Config.swift (L302)
With a minimum contrast set, the colored glyphs that Powerline uses
would sometimes be set to white or black while the surrounding background
colors remain unchanged, breaking up contiguous colors on segments of
the Powerline.
This no longer happens with this patch as Powerline glyphs are now
special-cased and exempt from the minimum contrast adjustment.