Mode 2048 and CSI 14 t are size report control sequences which contain
the text area size in pixels. The text area is defined to be the extents
of the grid (rows and columns). Ghostty calculates the available size
for the text area by setting the available padding, and then filling as
much of the remaining space as possible. However, if there are remainder
pixels these are still reported as part of the text area size.
Pass the cell_size geometry through so that we can always report the
correct value: columns * cell width and rows * cell height.
As suggested: https://github.com/ghostty-org/ghostty/discussions/2363#discussioncomment-10824847
This allows users of non-US keyboard layouts to continue to use the
right option key for input methods, while still being able to use the
the left option key as alt for keybindings.
This is a bit of an experiment to see if this is a good default for
everyone. This is in response to very common confusion of US keyboard
layouts where "alt" doesn't work along with the very common use of
non-US layouts where the right option key is used for input methods.
I think this will strike the right balance for most users.
This fixes a regression from #2454. In that PR, we added an error when
positional arguments are detected. I believe that's correct, but we
were silently relying on the previous behavior in the CLI commands.
This commit changes the CLI commands to use a new argsIterator function
that creates an iterator that skips the first argument (argv0). This is
the same behavior that the config parsing does and now uses this shared
logic.
This also makes it so the argsIterator ignores actions (`+things`)
and we document that we expect those to be handled earlier.
Rather than storing a list of errors we now store a list of
"diagnostics." Each diagnostic has a richer set of structured
information, including a message, a key, the location where it occurred.
This lets us show more detailed messages, more human friendly messages, and
also let's us filter by key or location. We don't take advantage of
all of this capability in this initial commit, but we do use every field
for something.
This continues our work to improve the amount of explicit error sets
we use in the codebase. Explicit error sets make it easier to understand
possible failure scenarios, allow us to use exhaustive matching, create
compiler errors if errors are unexpectedly added or removed, etc.
The goal eventually is 100% coverage but we're not even close yet.
This just moves us a little closer.
If the apprt is GTK add the GTK and the libadwaita version info to the
`+version` action. This information is available in the log but it may
be more accessible here.
- Make canvas geometry primitives generic, use `Rect(u32)` for `rect`
function, so that we don't have to worry about negatives or rounding.
- Make `Quads` struct packed just in case it gets non-comptime use in
the future.
- Clarify comment on why we're discarding out of range pixels + runtime
unreachable for any other type of error which we shouldn't ever see.
- Move z2d import above in-tree imports.
Fixes#2432
On macOS, processes with an NSApplicationMain entrypoint do not have
access to libc argc/argv. Instead, we must use NSProcessInfo. This
commit introduces an args iterator that uses NSProcessInfo, giving us
access to the args.
This also fixes an issue where we were not properly skipping argv0 when
iterating over the args. This happened to be fine because we happened to
ignore invalid args but it introduces a config error.
This takes advantage of CSS variables and color expressions to improve
the `window-theme=ghostty` support. The only visibile difference from
the previous implementation is that the header bar will darken if the
Ghostty window is in the background, which is standard for GTK apps.
This is conditional at runtime. If Ghostty detects that you're running
against GTK 4.16 or newer it will use the CSS variables and color calcs.
If you're running against older versions it will use CSS classes to
achieve nearly the same effect.
More complete coverage of the Symbols For Legacy Computing block,
including characters from Unicode 16.0.
Pixman and the web canvas impl for Canvas have been removed in favor of
z2d for drawing, since it has a nicer API with more powerful methods,
and is in Zig with no specific platform optimizations so should compile
to wasm no problem.
Use a single unified function for intersection-style line drawing chars,
and one for fractional block characters. Add a ground truth image based
on this commit for the regression test (differences from before changes
validated visually, 1 incorrect rendering actually fixed)