11175 Commits

Author SHA1 Message Date
Alex
a19f4aea0a Removed boolean logic, reverted back to ctrlOrSuper call 2025-07-12 09:29:03 -07:00
Alex
1e88984709 Merge branch 'main' into fix-copy-url 2025-07-11 20:21:05 -07:00
trag1c
391290aa4a i18n: Update Korean Translations (#7885) 2025-07-11 21:29:52 +02:00
Hojin You
c4e10a1ac1 Update po/ko_KR.UTF-8.po
remove extra space

Co-authored-by: trag1c <dev@jakubr.me>
2025-07-11 10:06:34 -04:00
Mitchell Hashimoto
6c0adaed0f renderer: Allow the renderer to draw transparent cells (#7913)
Fixes #5917

Allows the terminal to draw transparent cells even if they don't have
the same background color, on user demand, with the
`background-opacity-cells` feature

<img width="2560" height="1440" alt="transparent"
src="https://github.com/user-attachments/assets/8c076671-3603-41a1-957d-46ddaeffa1ff"
/>
2025-07-11 07:01:54 -07:00
nferhat
991426e84e renderer: Allow the renderer to draw transparent cells
Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-07-11 06:59:01 -07:00
Mitchell Hashimoto
4aa28988a6 build: zig build test runs Xcode tests on macOS (#7909)
Related to #7879

This commit updates `zig build test` to run Xcode tests, too. These run
in parallel to the Zig tests, so they don't add any time to the test.

The Xcode tests will _not_ run when: (1) the target is not macOS, or (2)
the `-Dtest-filter` option is non-empty. This makes it so that this
change doesn't affect non-macOS and doesn't affect the general dev cycle
because you usually will run `-Dtest-filter` when developing a core
feature.

I didn't add a step to only run Xcode tests because I find that when I'm
working in Xcode I'm probably going to run the tests from there anyways.
The integration with `zig build test` is just a convenience, especially
around CI.

Speaking of CI, this change also makes it so this will run in CI.
2025-07-10 21:21:46 -07:00
Mitchell Hashimoto
2dce107738 ci: downgrade back to Xcode 26 beta 1, the icon is broken in beta 3 (#7911) 2025-07-10 21:15:37 -07:00
Mitchell Hashimoto
cb3f67e810 build(deps): bump namespacelabs/nscloud-cache-action from 1.2.8 to 1.2.9 (#7910)
Bumps
[namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action)
from 1.2.8 to 1.2.9.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0ac1550c04"><code>0ac1550</code></a>
Merge pull request <a
href="https://redirect.github.com/namespacelabs/nscloud-cache-action/issues/21">#21</a>
from namespacelabs/niklas-not-silent</li>
<li><a
href="02b3441b28"><code>02b3441</code></a>
Make tool executions not silent</li>
<li>See full diff in <a
href="449c929cd5...0ac1550c04">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=namespacelabs/nscloud-cache-action&package-manager=github_actions&previous-version=1.2.8&new-version=1.2.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2025-07-10 21:12:38 -07:00
Mitchell Hashimoto
cfad2e817b ci: downgrade back to Xcode 26 beta 1, the icon is broken in beta 3 2025-07-10 21:11:57 -07:00
Mitchell Hashimoto
9fa26387ef build: zig build test runs Xcode tests on macOS
Related to #7879

This commit updates `zig build test` to run Xcode tests, too. These run
in parallel to the Zig tests, so they don't add any time to the test.

The Xcode tests will _not_ run when: (1) the target is not macOS, or (2)
the `-Dtest-filter` option is non-empty. This makes it so that this
change doesn't affect non-macOS and doesn't affect the general dev cycle
because you usually will run `-Dtest-filter` when developing a core
feature.

I didn't add a step to only run Xcode tests because I find that when I'm
working in Xcode I'm probably going to run the tests from there anyways.
The integration with `zig build test` is just a convenience, especially
around CI.

Speaking of CI, this change also makes it so this will run in CI.
2025-07-10 21:08:51 -07:00
dependabot[bot]
099a2d7f03 build(deps): bump namespacelabs/nscloud-cache-action from 1.2.8 to 1.2.9
Bumps [namespacelabs/nscloud-cache-action](https://github.com/namespacelabs/nscloud-cache-action) from 1.2.8 to 1.2.9.
- [Release notes](https://github.com/namespacelabs/nscloud-cache-action/releases)
- [Commits](449c929cd5...0ac1550c04)

---
updated-dependencies:
- dependency-name: namespacelabs/nscloud-cache-action
  dependency-version: 1.2.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-11 00:13:59 +00:00
Jon Parise
c03942d3c1 bash: preserve an existing ENV value (#7908) 2025-07-10 19:06:31 -04:00
Mitchell Hashimoto
9a3a6a8352 ci: add shellcheck linting for shell scripts (#7904)
Resolves #7882
2025-07-10 14:42:13 -07:00
Jon Parise
01233a48d1 bash: preserve an existing ENV value
Our bash shell integration code uses ENV (in POSIX mode) to bootstrap
our shell integration script. This had the side effect of overwriting an
existing ENV value.

This change preserves ENV by storing it temporarily in GHOSTTY_BASH_ENV.

Note that this doesn't enable --posix mode support for automatic shell
integration. (--posix does work; we just skip shell integration when
that flag is specified.) We can reconsider implementing full --posix
support separately.
2025-07-10 15:47:55 -04:00
Bryan Lee
cbb3f6f64f ci: add shellcheck linting for shell scripts
Add shellcheck to CI pipeline to ensure shell scripts follow best practices
and catch common errors. Fix existing shellcheck warnings in test scripts
to pass the new linting requirements.
2025-07-11 02:54:05 +08:00
Hojin You
4dc4911ece Update po/ko_KR.UTF-8.po 2025-07-10 14:46:46 -04:00
Qwerasd
cc646ecf46 Fix custom shader cursor uniforms not set for non-block cursors (#7897)
Fixes #7893

Previously, custom shader cursor uniforms were only updated when the
cursor glyph was in the front (block) cursor list. This caused non-block
cursors (such as bar, underline, hollow block, and lock) to be missing
from custom shader effects.

This commit adds a helper to the cell contents struct to retrieve the
current cursor glyph from either the front or back cursor lists, and
updates the renderer to use this helper when setting custom shader
uniforms. As a result, custom shaders now receive correct cursor
information for all supported cursor styles.
2025-07-10 09:26:46 -06:00
Mitchell Hashimoto
1172332621 ci: update sequoia builders to xcode 26 beta 3, output version in CI (#7901)
The `-edge` variant of these builders will always use the latest macOS
images that may not be stable. We'll remove this once Xcode 26 is
released.
2025-07-10 07:27:17 -07:00
Mitchell Hashimoto
c23e3f8586 ci: update sequoia builders to xcode 26 beta 3, output version in CI
The `-edge` variant of these builders will always use the latest macOS
images that may not be stable. We'll remove this once Xcode 26 is
released.
2025-07-10 07:08:24 -07:00
Jon Parise
530785926e elvish: revise the ssh integration (#7894)
The previous implementation wasn't quite working. This revision reworks
it in a few ways:

- Fix various syntax issues
- Redirect the `ssh` command to our 'ssh-integration' function
- Locate the `ghostty` binary using $GHOSTTY_BIN_DIR
- Use os:temp-dir to create our temporary directory

Also, consistently use 2-space indents, which is the Elvish standard.
2025-07-10 07:58:37 -04:00
ClearAspect
36a3a3ffa4 Add tests for getCursorGlyph() helper function 2025-07-10 01:48:44 -04:00
Qwerasd
1de35bbcb9 Fix viewport going out of bounds when zooming out (#7899)
The viewport pin was allowed to go below the active pin during resize,
which caused a use of null when trying to get the bottom right of the
viewport since going down by the active row count from the viewport pin
ends up below the bottom of the active area.

Ran in to this while doing font work because I was scrolled up slightly
and increasing and decreasing to see stuff at different sizes.
2025-07-09 23:15:26 -06:00
Qwerasd
ea4a056d34 test(terminal/PageList): resize keeps viewport <= active
This tests for the bug fixed in the last commit.
2025-07-09 22:47:01 -06:00
Mitchell Hashimoto
68418ecd53 Modernize our benchmarks (#7891)
This PR modernizes our benchmarks. This PR focuses on the benchmark
_framework_ and not the benchmarks themselves. That will come in later
PRs.

We now produce two binaries with `-Demit-bench`: `ghostty-bench` and
`ghostty-gen`. The former is our benchmark tool. The latter is our
synthetic data generation tool. The benchmarking CLI usually takes in
data from the synthetic generator but we want to do that offline because
synthetic data generation can be slow and CPU intensive and mess up our
benchmarks.

Our previous benchmark-specific binaries (like
`ghostty-bench-codepoint-width`) are all gone. This is all executed as
subcommands in the format similar to Ghostty users: `ghostty-bench
+codepoint-width --other --args`.

Previously, synthetic data generation was a mess and all unified with
`ghostty-bench-stream` which is just nasty. A dedicated CLI now gets us
args like `ghostty-gen +osc --p-valid=0.5`. Neat!

## Signposts and Xcode/Instruments on macOS

The benchmark framework now automatically emits
[signposts](https://developer.apple.com/documentation/os/recording-performance-data)
around the code that is under test. This is surfaced in Instruments as a
region that you can visualize and zoom in on so you can omit any of the
other overhead.

Additionally, I've integrated benchmarks with libghostty and our Xcode
project so you can just right click a benchmark to open it in
Instruments.

These are macOS-specific niceties but the core benchmarking tool is
platform-agnostic.

## Generalized CLI Actions

The `src/cli/action.zig` file was generalized so that it can be shared
amongst our three action-ized binaries. The Ghostty-specific actions are
now in `src/cli/ghostty.zig`. As an added bonus, our action parsing is
now fully unit tested.

I don't like mixing refactors in with other tasks in PRs but in this
case this one was done to enable not one but two other consumers in the
same PR, so I think it fits.

## TODO

Some things I want to do before merge.

- [ ] Add flags to `ghostty-bench` to configure once mode vs duration
mode
2025-07-09 21:42:53 -07:00
Mitchell Hashimoto
1317a55a9d build: make the xcframework step dsym aware, even though we don't use it (#7898)
This was in pursuit of trying to get line numbers in `zig build run` on
macOS to work, but I wasn't able to figure that out and this wasn't the
right path because static libs can't have dsyms. But, it may still be
useful to make the xcframework step dsym aware for future use so I'm
PRing this.

This also updates our libghostty build steps to use the new
`root_module` form which is recommend for Zig 0.14 and we forgot to
update long ago.
2025-07-09 21:41:10 -07:00
Mitchell Hashimoto
cc0d7acaef build: make the xcframework step dsym aware, even though we don't use it
This was in pursuit of trying to get line numbers in `zig build run` on
macOS to work, but I wasn't able to figure that out and this wasn't the
right path because static libs can't have dsyms. But, it may still be
useful to make the xcframework step dsym aware for future use so I'm
PRing this.
2025-07-09 21:35:02 -07:00
Qwerasd
6744e57c68 fix(terminal/PageList): update viewport in row count resize
Before, if the row count increase past the active area then we added new
rows to make sure that we had enough for the active area, but we didn't
make sure that the viewport pin wasn't below the active area pin, which
meant that later on if someone tried to get the bottom right pin for the
viewport it would overshoot and we'd use null. This resulted in either a
memory corruption bug in ReleaseFast if you scaled down the font while
scrolled up slightly, or in Debug mode it was just a crash.
2025-07-09 22:28:08 -06:00
ClearAspect
88736a2ddb Fix custom shader cursor uniforms not set for non-block cursors (#7893)
Fixes #7893

Previously, custom shader cursor uniforms were only updated when the
cursor glyph was in the front (block) cursor list. This caused non-block
cursors (such as bar, underline, hollow block, and lock) to be missing
from custom shader effects.

This commit adds a helper to the cell contents struct to retrieve the
current cursor glyph from either the front or back cursor lists, and
updates the renderer to use this helper when setting custom shader
uniforms. As a result, custom shaders now receive correct cursor
information for all supported cursor styles.
2025-07-10 00:21:21 -04:00
Jon Parise
5cdfe3d70e elvish: revise the ssh integration
The previous implementation wasn't quite working. This revision reworks
it in a few ways:

- Fix various syntax issues
- Redirect the `ssh` command to our 'ssh-integration' function
- Locate the `ghostty` binary using $GHOSTTY_BIN_DIR
- Use os:temp-dir to create our temporary directory

Also, consistently use 2-space indents, which is the Elvish standard.
2025-07-09 22:19:13 -04:00
Mitchell Hashimoto
d0c5191aef build(deps): bump cachix/install-nix-action from 31.4.1 to 31.5.0 (#7892)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 31.4.1 to 31.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.29.1 -&gt; 2.30.0 by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>
in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/244">cachix/install-nix-action#244</a>
Release notes: <a
href="https://nix.dev/manual/nix/2.30/release-notes/rl-2.30.html">https://nix.dev/manual/nix/2.30/release-notes/rl-2.30.html</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v31.4.1...v31.5.0">https://github.com/cachix/install-nix-action/compare/v31.4.1...v31.5.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cebd211ec2"><code>cebd211</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/244">#244</a>
from cachix/create-pull-request/patch</li>
<li><a
href="358e2ef1b2"><code>358e2ef</code></a>
nix: 2.29.1 -&gt; 2.30.0</li>
<li>See full diff in <a
href="f0fe604f8a...cebd211ec2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=31.4.1&new-version=31.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2025-07-09 18:23:05 -07:00
dependabot[bot]
e962e9b517 build(deps): bump cachix/install-nix-action from 31.4.1 to 31.5.0
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.4.1 to 31.5.0.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](f0fe604f8a...cebd211ec2)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-10 00:22:27 +00:00
Mitchell Hashimoto
74b94ef30a remove src/bench 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
a09452bf1b synthetic: add osc/utf8 generators 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
a28b7e9205 synthetic cli (ghostty-gen) 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
b5ff0442d4 bench: remove old benchmarks we converted 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
99ed984af2 benchmark: add GraphemeBreak and TerminalParser benchmarks 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
5890826356 benchmark: add codepoint width benchmark 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
c990d35d6d macos: add benchmark tests to our Xcode project 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
20bb71c627 libghostty: export benchmark CLI API 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
01b2545d1d macos: fix signpost API to use proper mach header base addr 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
d30771ecff pkg/macos: use new @ptrcast for os.log 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
b8f5cf9d52 initial ghostty-bench program 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
1739418f6f cli: make the action parser (+foo) generic and reusable 2025-07-09 15:06:24 -07:00
Mitchell Hashimoto
0e8ccc7352 benchmark: a new package and framework for benchmarking 2025-07-09 15:06:23 -07:00
Mitchell Hashimoto
8506637ae6 macos: add signpost API 2025-07-09 15:06:23 -07:00
Jon Parise
464dc78172 shell-integration: use $GHOSTTY_BIN_DIR/ghostty (#7887) 2025-07-09 17:46:22 -04:00
Jon Parise
f5f2a4dd20 shell-integration: use $GHOSTTY_BIN_DIR/ghostty
Locate our ghostty binary using $GHOSTTY_BIN_DIR rather than searching
the PATH.
2025-07-09 17:25:34 -04:00
Jon Parise
87579b8594 shell-integration: simplify "ssh target" checks (#7884) 2025-07-09 16:32:11 -04:00
Hojin You
9818543ebe Update Korean Translations 2025-07-09 16:27:22 -04:00