Commit Graph

12187 Commits (7071a22cb54ffbbe0b9d46aeec9954f9c25cd69c)

Author SHA1 Message Date
Matthias von Arx e0905ac794 documentation: fix MacOSDockDropBehavior valid values 2025-09-29 12:52:03 -07:00
Mitchell Hashimoto b34f3f7208
renderer: create explicit sampler state for custom shaders
The GLSL to MSL conversion process uses a passed-in sampler state for
the `iChannel0` parameter and we weren't providing it. This magically
worked on Apple Silicon for unknown reasons but failed on Intel GPUs.

In normal, hand-written MSL, we'd explicitly create the sampler state as
a normal variable (we do this in `shaders.metal` already!), but the
Shadertoy conversion stuff doesn't do this, probably because the exact
sampler parameters can't be safely known.

This fixes a Metal validation error when using custom shaders:

```
-[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5970: failed 
assertion `Draw Errors Validation Fragment Function(main0): missing Sampler 
binding at index 0 for iChannel0Smplr[0].
```
2025-09-29 12:51:48 -07:00
Mitchell Hashimoto 51292a9793
renderer/metal: provide MTLTextureUsage render target for custom shaders (#8749)
This fixes a Metal validation error in Xcode when using custom shaders.
I suspect this is one part of custom shaders not working properly on
Intel macs (probably anything with a discrete GPU).

This happens to work on Apple Silicon but this is undefined behavior and
we're just getting lucky.

There is one more issue I'm chasing down that I think is also still
blocking custom shaders working on Intel macs.
2025-09-29 12:51:33 -07:00
Mitchell Hashimoto 1cd0fb5dab
fix(font): Improve FreeType glyph measurements and add unit tests for face metrics (#8738)
Follow-up to #8720 adding

* Two improvements to FreeType glyph measurements:
- Ensuring that glyphs are measured with the same hinting as they are
rendered, ref
[#8720#issuecomment-3305408157](https://github.com/ghostty-org/ghostty/pull/8720#issuecomment-3305408157);
- For outline glyphs, using the outline bbox instead of the built-in
metrics, like `renderGlyph()`.
* Basic unit tests for face metrics and their estimators, using the
narrowest and widest fonts from the resource directory, Cozette Vector
and Geist Mono.

---

I also made one unrelated change to `freetype.zig`, replacing
`@alignCast(@ptrCast(...))` with `@ptrCast(@alignCast(...))` on line
173. Autoformatting has been making this change on every save for weeks,
and reverting the hunk before each commit is getting old, so I hope it's
OK that I use this PR to upstream this decree from the formatter.
2025-09-29 12:50:49 -07:00
Daniel Wennberg 5c6a766ff6 Measure ascii height and use to upper bound ic_width 2025-09-29 12:50:01 -07:00
Leah Amelia Chen 6b1fd76b7d Default config template be explicit that you do not copy the default values (#8701) 2025-09-29 12:49:35 -07:00
Mitchell Hashimoto 581846992d
selection scrolling should only depend on y value
Fixes #8683

The selection scrolling logic should only depend on the y value of the
cursor position, not the x value. This presents unwanted scroll
behaviors, such as reversing the scroll direction which was just a side
effect of attempting to scroll tick to begin with.
2025-09-29 12:49:22 -07:00
Mitchell Hashimoto 86e5ec8ba5
font-size reloads at runtime if the font wasn't manually set
This was a very common pitfall for users. The new logic will reload the
font-size at runtime, but only if the font wasn't manually set by the
user using actions such as `increase_font_size`, `decrease_font_size`,
or `set_font_size`. The `reset_font_size` action will reset our state
to assume the font-size wasn't manually set.

I also updated a comment about `font-family` not reloading at runtime;
this wasn't true even prior to this commit.
2025-09-29 12:49:00 -07:00
Mitchell Hashimoto 5a0bd8d1fa
config: fix binding parsing to allow values containing `=`
Fixes #8667

The binding `a=text:=` didn't parse properly.

This is a band-aid solution. It works and we have test coverage for it
thankfully. Longer term we should move the parser to a fully
state-machine based parser that parses the trigger first then the
action, to avoid these kind of things.
2025-09-29 12:48:45 -07:00
Filip Milković 28cdbe4f22 i18n: add Croatian hr_HR translation (#8668) 2025-09-29 12:48:34 -07:00
Simon Olofsson a4126d025b config: update theme names in docs
They were renamed, see: https://github.com/mbadolato/iTerm2-Color-Schemes/commits/master/ghostty/Rose%20Pine
2025-09-29 12:48:06 -07:00
カワリミ人形 b4345d151a docs: add lacking version information
`quick-terminal-size` option is available since 1.2.0
2025-09-29 12:47:56 -07:00
rhodes-b af77332871 mark ssh shell-integration wrapper as a function this matches other features + fixes a case where users alias to some other command 2025-09-29 12:47:27 -07:00
dmunozv04 c33ea2757c Docs: add undo-timeout configuration setting name 2025-09-29 12:47:16 -07:00
Caleb Hearth 6753507826 Pass config to splits in NewTerminalConfig
Config contains the command, working directory, and environment
variables intended to be passed to the new split, but it looks like we
forgot to include it as an argument in this branch.

Discussion: https://github.com/ghostty-org/ghostty/discussions/8637
2025-09-29 12:47:05 -07:00
Nilton Perim Neto 7884909253 Some portuguese translation updates (#8633)
Added some prepositions not previously added and
changed a word to be more accurate to the portuguese meaning

---------

Signed-off-by: Nilton Perim Neto <niltonperimneto@gmail.com>
2025-09-29 12:46:45 -07:00
Daniel Wennberg 812dc7cf2f Rewrite constraint code for improved icon scaling/alignment 2025-09-29 12:45:56 -07:00
Peter Dave Hello 81027f2211 Add zh_TW Traditional Chinese locale 2025-09-29 12:45:21 -07:00
Mitchell Hashimoto 3e38e284ca
pin iTerm2 themes dependency (#8632)
There is an upstream bug where subsequent releases will nuke prior
released packages, resulting in 404s. Not good!
2025-09-15 09:33:51 -07:00
Mitchell Hashimoto 693d64b5f8
pin iTerm2 themes dependency
There is an upstream bug where subsequent releases will nuke prior
released packages, resulting in 404s. Not good!
2025-09-15 09:31:09 -07:00
Mitchell Hashimoto d4e62cb6d9
ci: source tarball needs to be uploaded to staged artifacts 2025-09-15 09:24:54 -07:00
Mitchell Hashimoto 6634afc358
ci: fix source tarball copy for release-tag 2025-09-15 09:12:37 -07:00
Mitchell Hashimoto 60aa53d5e2
Update iTerm2 colorschemes (#8631)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20250915-154825-b4500fc
2025-09-15 08:57:55 -07:00
mitchellh 5e52659d51 deps: Update iTerm2 color schemes 2025-09-15 15:57:37 +00:00
Mitchell Hashimoto 895fb5f5db
ci: release tip should also staple the dmg 2025-09-15 08:49:47 -07:00
Mitchell Hashimoto d205e65c4d
ci: update tag release to Xcode 26, sparkle to 2.7.3 (#8630)
Our built sparkle was always 2.7.3 recently, this just updates our CI
jobs for the auxiliary binaries.
2025-09-15 08:36:27 -07:00
Mitchell Hashimoto c195cb054d
ci: update tag release to Xcode 26, sparkle to 2.7.3 2025-09-15 08:33:17 -07:00
Mitchell Hashimoto a426e22cb2
Set version to 1.2.0 (#8629) 2025-09-15 08:28:58 -07:00
Mitchell Hashimoto 510f4e474c
Set version to 1.2.0 2025-09-15 08:25:54 -07:00
Mitchell Hashimoto b58a761aba
macos: disable NSAutoFillHeuristicController on macOS 26 (#8625)
Fixes #8616

macOS 26 (as of RC1) has some pathological performance bug where the
terminal becomes unusably slow after some period of time. We aren't 100%
sure what triggers the slowdown, but it is app-wide (new tabs or windows
don't resolve it) and Instruments traces point directly to
NSAutoFillHeuristicController. Specifically, to the `debounceTextUpdate`
selector.

This is all not documented as far as I can find and also not open
source, so I have no idea what's going on.

The best I can tell is that the NSAutoFillHeuristicController has
something to do with enabling heuristic-based autofill such as SMS auth
codes in text input fields. I don't know what is causing it to go
haywire.

SMS autofill is not desirable in a terminal app, nor is any of the other
automatic autofill in macOS I know of (contact info, passwords, etc.).
So, we can just disable it.

This default isn't documented but I found it via a strings dump of the
AppKit binary blob and comparing it to the disassembly to see how it is
used. In my limited testing, this seems to work around the problem.
2025-09-14 13:22:54 -07:00
Mitchell Hashimoto 431364cf16
macos: disable NSAutoFillHeuristicController on macOS 26
Fixes #8616

macOS 26 (as of RC1) has some pathological performance bug where the
terminal becomes unusably slow after some period of time. We aren't 100%
sure what triggers the slowdown, but it is app-wide (new tabs or windows
don't resolve it) and Instruments traces point directly to
NSAutoFillHeuristicController. Specifically, to the `debounceTextUpdate`
selector.

This is all not documented as far as I can find and also not open
source, so I have no idea what's going on.

The best I can tell is that the NSAutoFillHeuristicController has
something to do with enabling heuristic-based autofill such as SMS auth
codes in text input fields. I don't know what is causing it to go
haywire.

SMS autofill is not desirable in a terminal app, nor is any of the other
automatic autofill in macOS I know of (contact info, passwords, etc.).
So, we can just disable it.

This default isn't documented but I found it via a strings dump of the
AppKit binary blob and comparing it to the disassembly to see how it is
used. In my limited testing, this seems to work around the problem.
2025-09-14 13:05:01 -07:00
Mitchell Hashimoto ab5cd0b709
ci: update-colorschemes sets GH token for gh 2025-09-14 07:07:27 -07:00
Mitchell Hashimoto 0c63946bdb
termio: don't send extra OSC terminator for color reports (#8615)
Fixes #8613

I reiterate my comment in my own PR that this needs to be extracted so
we can unit test this. :)
2025-09-12 21:20:52 -07:00
Mitchell Hashimoto d7c2a829bb
termio: don't send extra OSC terminator for color reports
Fixes #8613

I reiterate my comment in my own PR that this needs to be extracted so
we can unit test this. :)
2025-09-12 21:19:16 -07:00
Mitchell Hashimoto a387d6cc08
terminal: OSC 104 with no semicolon should parse as reset palette (#8614)
https://github.com/ghostty-org/ghostty/pull/8590#issuecomment-3287418867
2025-09-12 21:12:11 -07:00
Mitchell Hashimoto a19aa0a398
terminal: OSC 104 with no semicolon should parse as reset palette
https://github.com/ghostty-org/ghostty/pull/8590#issuecomment-3287418867
2025-09-12 21:10:07 -07:00
Mitchell Hashimoto b5c8c83468
macOS 26: Always set titlebarview background color for transparent title (#8611)
This fixes an issue where new tabs would not have the proper transparent
background set whilst in native fullscreen. This is because in native
fullscreen, the NSTitlebarView always is visible, so our guard was
preventing us from setting it before.
2025-09-12 20:49:30 -07:00
Mitchell Hashimoto d813d82da1
macOS 26: Always set titlebarview background color for transparent title
This fixes an issue where new tabs would not have the proper transparent
background set whilst in native fullscreen. This is because in native
fullscreen, the NSTitlebarView always is visible, so our guard was
preventing us from setting it before.
2025-09-12 20:41:02 -07:00
Mitchell Hashimoto bbf03cfa07
macOS 26: always reset titlebar tab constraints on frame change (#8610)
Fixes #8595

Whenever the titlebar frame changes, we should set up our constraints
again to force it to re-render properly.
2025-09-12 20:40:53 -07:00
Mitchell Hashimoto eaaf5aa8cf
macos: always reset titlebar tab constraints on frame change
Fixes #8595

Whenever the titlebar frame changes, we should set up our constraints
again to force it to re-render properly.
2025-09-12 20:14:31 -07:00
Mitchell Hashimoto da7e3d1882
deps/ci: Use Ghostty-specific themes release (#8609)
Closes #8608 
iterm2_themes now provides terminal-specific releases, this reduces the
size of the dependency from 55MB->53kB.
- Update the `.github/workflows/update-colorschemes.yml` to track the
latest release and fetch the ghostty-specific theme archive.
2025-09-12 14:45:02 -07:00
azhn ffa54dceea Update ` .github/workflows/update-colorschemes.yml` to track the latest release and update the ghostty-specific download 2025-09-13 07:17:00 +10:00
azhn 928f5492dc Fix name of `check-zig-cache.sh` in documentation for updating the zig cache hash 2025-09-13 06:54:56 +10:00
azhn e0350aa13f nix: update build.zig.zon.nix build.zig.zon.txt build.zig.zon.json flatpak/zig-packages.json 2025-09-13 06:53:18 +10:00
azhn ac07cf5270 Use ghostty-specific themes release 2025-09-13 06:52:44 +10:00
Mitchell Hashimoto 74b204b6ce
ci: disable trigger-snap for PRs (#8601)
Fixes #8568

This will hide snap issues from PRs which is not ideal but we can
address that in the future. We still run snap CI for main.

This more importantly ensures that CI can be green for maintainers to
merge.
2025-09-12 07:34:59 -07:00
Mitchell Hashimoto dc7bf7e71f
ci: disable trigger-snap for PRs
Fixes #8568

This will hide snap issues from PRs which is not ideal but we can
address that in the future. We still run snap CI for main.
2025-09-12 07:29:44 -07:00
Mitchell Hashimoto db24f9715b
Position-independent font shaper caching (#8555)
Use relative cluster positioning to allow identical texts runs in
different row positions to share the same cache entry.

I am opening this PR clean w/o the cache size change. There could be
some benefit to a larger 256->512 shaper cache, but this still performs
amazingly well and I don't know the full memory impacts of moving the
cache size up.


https://github.com/ghostty-org/ghostty/discussions/8547#discussioncomment-14329590
2025-09-12 07:27:21 -07:00
Mitchell Hashimoto a8c3186658
macos 26: fix visual glitches with moving tabs and titlebar tabs (#8594)
This is a hacky fix to fix some visual glitches when titlebar tabs is on
and we're using the `move_tab` keybinding action (I test via the command
palette).

There is probably a more graceful way to fix this but this might be good
enough for a 1.2 to fix a very obviously nasty UI render.
2025-09-11 14:57:07 -07:00
Mitchell Hashimoto 09246780bb
macos 26: fix visual glitches with moving tabs and titlebar tabs
This is a hacky fix to fix some visual glitches when titlebar tabs is on
and we're using the `move_tab` keybinding action (I test via the command
palette).

There is probably a more graceful way to fix this but this might be good
enough for a 1.2 to fix a very obviously nasty UI render.
2025-09-11 14:51:01 -07:00