Commit Graph

14561 Commits

Author SHA1 Message Date
Kat
2a18c25eb6 i18n: Update ca_ES translations for 1.3 (#10845) 2026-02-18 18:28:56 +00:00
Kat
5e1d365712 i18n: update ko_KR translations (#10832)
Ref: https://github.com/ghostty-org/ghostty/issues/10632#issuecomment-3919649650
2026-02-18 18:14:37 +00:00
ghostty-vouch[bot]
fe5928baac Update VOUCHED list (#10846)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10845#issuecomment-3922383468)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 18:13:51 +00:00
KristoferSoler
e7cfe0e360 i18n: Update ca_ES translations for 1.3 2026-02-18 19:10:35 +01:00
trag1c
ff3c4e77a6 i18n: update Polish translations (#10825)
Yet another update of the Polish translations.
2026-02-18 18:48:19 +01:00
Mitchell Hashimoto
48c9b8f6fc fix(build): add support for apple SDK paths to load system libraries (#10758)
The PR addresses `lib-vt` iOS build issue caused by missing `apple_sdk`
path. See #10663 for more details.
2026-02-18 09:45:36 -08:00
Mitchell Hashimoto
d1de9aca94 ci: make the libghostty-macos builds required 2026-02-18 09:36:46 -08:00
Mitchell Hashimoto
85a631dd20 build: stylistic changes for libvt 2026-02-18 09:35:08 -08:00
Elias Andualem
20af48de96 build: enhance Darwin build configs for LLVM and SDK paths 2026-02-18 09:35:08 -08:00
Elias Andualem
90e4e0296a ci: add separate Darwin build targets for libghostty-vt 2026-02-18 09:35:08 -08:00
Elias Andualem
44b7d34652 fix: add support for apple SDK paths in Darwin builds 2026-02-18 09:35:08 -08:00
Mitchell Hashimoto
cfb8c28b1b macos: improve "Set Default Terminal" (#10843)
Switch to using the existing UTType.unixExecutable constant for this
operator, which also lets us remove a failure path. Also, use the
completion-based setDefaultApplication() variant to handle errors.

This simplifies the code enough that we don't need the additional
NSWorkspace+Ghostty extension functions.
2026-02-18 09:03:45 -08:00
Mitchell Hashimoto
d98334a94a Add Bulgarian (bg_BG) to CODEOWNERS. (#10820)
It's the only missing one.

cc @ghostty-org/bg_bg (no need to review, pinging you three to let you
know this happened).
2026-02-18 08:50:09 -08:00
Jon Parise
303c9142dc macos: improve "Set Default Terminal"
Switch to using the existing UTType.unixExecutable constant for this
operator, which also lets us remove a failure path. Also, use the
completion-based setDefaultApplication() variant to handle errors.

This simplifies the code enough that we don't need the additional
NSWorkspace+Ghostty extension functions.
2026-02-18 11:47:30 -05:00
ghostty-vouch[bot]
ef3eaf8c17 Update VOUCHED list (#10842)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10841#issuecomment-3921768420)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 16:20:28 +00:00
Kat
299824a52b i18n: updated ga_IE for 1.3 (#10673)
I've translated the latest strings.

Go raibh maith agat!
2026-02-18 14:47:24 +00:00
ghostty-vouch[bot]
3b63a00b9d Update VOUCHED list (#10839)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10838#issuecomment-3921201616)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 14:38:40 +00:00
Aindriú Mac Giolla Eoin
a1a47d0114 Fixed two strings plurals, capitalisation of one string 2026-02-18 14:34:28 +00:00
ghostty-vouch[bot]
e3bb89dd63 Update VOUCHED list (#10837)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10836#issuecomment-3921157410)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 14:29:59 +00:00
Kat
ff44f10bef i18n: update fr_FR translations (#10833) 2026-02-18 14:20:29 +00:00
ghostty-vouch[bot]
5f1e73d583 Update VOUCHED list (#10835)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10833#issuecomment-3921032028)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 14:07:27 +00:00
ghostty-vouch[bot]
3a98c6613c Update VOUCHED list (#10834)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10832#issuecomment-3921030289)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 14:07:08 +00:00
Paul Berg
3b93bc0a48 i18n: update fr_FR translations 2026-02-18 15:04:57 +01:00
GyuYong Jung
6029ea5fd7 i18n: update ko_KR translations 2026-02-18 23:03:08 +09:00
ghostty-vouch[bot]
c2913a1776 Update VOUCHED list (#10830)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10829#issuecomment-3920581024)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 12:33:08 +00:00
Kat
5a385490bd i18n: update uk_UA translations (#10827)
Three more strings for 1.3 release.
2026-02-18 12:32:08 +00:00
ghostty-vouch[bot]
d8c58faac4 Update VOUCHED list (#10828)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10827#issuecomment-3920514749)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 12:18:55 +00:00
Volodymyr Chernetskyi
bd062592fb i18n: update uk_UA translations 2026-02-18 13:14:15 +01:00
ghostty-vouch[bot]
f1e6c6f5ad Update VOUCHED list (#10826)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10825#issuecomment-3920396317)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 11:53:49 +00:00
Bartosz Sokorski
d48b5da22f i18n: update Polish translations 2026-02-18 12:51:31 +01:00
Aindriú Mac Giolla Eoin
314ffcba87 Updated 3 strings 2026-02-18 11:31:39 +00:00
Aindriú Mac Giolla Eoin
09f2243a6b Merge branch 'ghostty-org:main' into ga-ghostty-1.3-translation 2026-02-18 11:17:38 +00:00
Kat
887b146422 i18n: Update Turkish translations (#10821) 2026-02-18 10:55:56 +00:00
Kat
fdf3626d56 i18n: lv_LV locale update (#10823)
As requested in
https://github.com/ghostty-org/ghostty/issues/10632#issuecomment-3919649650
2026-02-18 09:50:39 +00:00
Aindriú Mac Giolla Eoin
8a01b56d9b Merge branch 'main' into ga-ghostty-1.3-translation 2026-02-18 09:47:04 +00:00
Ēriks Remess
56b85ca0e1 i18n: lv_LV locale update 2026-02-18 11:37:18 +02:00
ghostty-vouch[bot]
18b8ebd4d2 Update VOUCHED list (#10822)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10821#issuecomment-3919692808)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 09:35:19 +00:00
Emir SARI
5f2bb2561e i18n: Update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2026-02-18 12:29:31 +03:00
Kat
d25a64dac7 Add Bulgarian (bg_BG) to CODEOWNERS. 2026-02-18 20:01:50 +11:00
ghostty-vouch[bot]
68646d6d22 Update VOUCHED list (#10817)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10815) from
@jcollie.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 06:06:16 +00:00
ghostty-vouch[bot]
9f9c788f57 Update VOUCHED list (#10816)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10814#issuecomment-3918912439)
from @00-kat.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 06:05:41 +00:00
Mitchell Hashimoto
e1f20739d0 add "Set Ghostty as Default Terminal App" on macOS (#10810)
This PR enables iTerm2-like one button "Set Ghostty as Default Terminal
App" functionality on macOS, making it easier to open a directory in
Ghostty, run shell scripts when mouse clicking, etc.
2026-02-17 21:04:55 -08:00
Mahno Kropotkinvich
aee80d208d add "Set Ghostty as Default Terminal App" on macOS 2026-02-17 20:52:49 -08:00
Mitchell Hashimoto
2080de562f GTK: wrap spatial goto around edges (#10811)
Related to #8406 (for GTK only)

Spatial split navigation now wraps at the edges.

We first attempt the nearest spatial target using the existing slot
geometry. If there is no candidate in the requested direction, we
synthesize a wrapped target by shifting the current slot by one full
grid in the opposite direction and reuse the same nearest-distance
logic.

This fake target works because the grid is 1x1, so by moving it a full
grid size in the opposite direction, we effectively wrap around to the
other side of the grid.
2026-02-17 20:40:56 -08:00
Mitchell Hashimoto
969748eb35 split_tree: wrap spatial goto around edges
Fixes #8406

Spatial split navigation now wraps at the edges.

We first attempt the nearest spatial target using the existing slot geometry. 
If there is no candidate in the requested direction, we synthesize a wrapped 
target by shifting the current slot by one full grid in the opposite 
direction and reuse the same nearest-distance logic. 

This fake target works because the grid is 1x1, so by moving it a full
grid size in the opposite direction, we effectively wrap around to the
other side of the grid.
2026-02-17 20:35:25 -08:00
Jeffrey C. Ollie
a3aa9fa136 i18n: Localize Nautilus .py script (#9976)
Closes #9266. 


Big Note: I noticed that this worked properly under `NixOS`, but on my
`Ubuntu` VM it didnt.

The reason is in
[src/build/GhosttyI18n.zig](73a93abf7b/src/build/GhosttyI18n.zig (L24-L31))
because the locale is expected in the `<lang>_<region>` without the
encoding suffix. `<lang>_<region>_<encoding>`
```
        // There is no encoding suffix in the LC_MESSAGES path on FreeBSD,
        // so we need to remove it from `locale` to have a correct destination string.
        // (/usr/local/share/locale/en_AU/LC_MESSAGES)
        const target_locale = comptime if (builtin.target.os.tag == .freebsd)
            std.mem.trimRight(u8, locale, ".UTF-8")
        else
            locale;

```
If i force it to always trim the encoding it works, but I am guessing
its there for a reason ,so maybe some of the maintainer can shed some
light in the best way forward, as I am not an expert in how other
systems deal with it. Here you see `Open in Ghostty` -> Abrir con
Ghostty

<img width="353" height="372" alt="image"
src="https://github.com/user-attachments/assets/2c0266f7-cfb3-49e3-aef1-9e98acb16ad8"
/>


- I wanted to format the `py` file with `ruff` but didnt want to drown
the changes, so maybe something that could be worth doing so that also
our `py` files have std formatting.

> [!NOTE]
> Used AI only for helping me debug where the locales could be and why
was it not detected, but no code help whatsoever
2026-02-17 18:34:53 -06:00
Mitchell Hashimoto
73d6f07c5b gtk: revamp cgroup/transient scope handling (#10611)
This changes the way Ghostty assigns itself and subprocesses to
cgroups and how resource controls are applied.
    
* Ghostty itself no longer modifies it's own cgroup or moves itself
to a transient scope. To modify the main Ghostty process' resource
controls ensure that you're launching Ghostty with a systemd unit and
use the standard systemd methods for overriding and applying changes
to systemd units.
    
* If configured (on by default), the process used to run your command
will be moved to a transient systemd scope after it is forked from
Ghostty but before the user's command is executed. Resource controls
will be applied to the transient scope at this time. Changes to
the `linux-cgroup*` configuration entries will not alter existing
commands. If changes are made to the `linux-cgroup*` configuration
entries commands will need to be relaunched. Resource limits can also
be modified after launch outside of Ghostty using systemd tooling. The
transient scope name can be shown by running `systemctl --user whoami`
in a shell running inside Ghostty.
    
Fixes #2084.
Related to #6669

Example of `systemctl status` showing main Ghostty process and one
surface:
<img width="1132" height="135" alt="Screenshot From 2026-02-07 16-31-14"
src="https://github.com/user-attachments/assets/81dffd0b-8801-4695-adf4-213647cdf0c3"
/>
2026-02-17 16:23:54 -08:00
Mitchell Hashimoto
dada3cd5fd Add MockView and SplitTreeTests (#10778)
This PR introduces unit tests and a supporting Mock NSView for testing
the SplitTree implementation in Swift. It includes 51 tests which
achieve approximately 93.13% (949/1019) coverage of SplitTree.swift's
branches.

<details>
  <summary>Coverage</summary>
  <pre>
./ghostty/macos/Sources/Features/Splits/SplitTree.swift 93.13%
(949/1019)
SplitTree.Path.isEmpty.getter 100.00% (1/1)
SplitTree.isEmpty.getter 100.00% (3/3)
SplitTree.isSplit.getter 100.00% (3/3)
SplitTree.init() 100.00% (3/3)
SplitTree.init(view:) 100.00% (3/3)
SplitTree.contains(_:) 100.00% (4/4)
SplitTree.inserting(view:at:direction:) 100.00% (6/6)
SplitTree.find(id:) 100.00% (4/4)
SplitTree.removing(_:) 93.75% (15/16)
SplitTree.replacing(node:with:) 93.75% (15/16)
SplitTree.focusTarget(for:from:) 82.14% (46/56)
closure #1 in SplitTree.focusTarget(for:from:) 100.00% (1/1)
closure #2 in SplitTree.focusTarget(for:from:) 100.00% (1/1)
closure #3 in SplitTree.focusTarget(for:from:) 100.00% (3/3)
implicit closure #1 in SplitTree.focusTarget(for:from:) 0.00% (0/1)
SplitTree.equalized() 100.00% (5/5)
SplitTree.resizing(node:by:in:with:) 92.00% (69/75)
closure #1 in SplitTree.resizing(node:by:in:with:) 100.00% (1/1)
SplitTree.viewBounds() 100.00% (4/4)
SplitTree.init(from:) 76.00% (19/25)
SplitTree.encode(to:) 100.00% (15/15)
SplitTree.Node.find(id:) 100.00% (13/13)
SplitTree.Node.node(view:) 88.89% (16/18)
SplitTree.Node.path(to:) 100.00% (32/32)
search #1 <A>(_:) in SplitTree.Node.path(to:) 100.00% (27/27)
SplitTree.Node.node(at:) 89.47% (17/19)
SplitTree.Node.inserting(view:at:direction:) 86.84% (33/38)
SplitTree.Node.replacingNode(at:with:) 100.00% (43/43)
replaceInner #1 <A>(current:pathOffset:) in
SplitTree.Node.replacingNode(at:with:) 96.67% (29/30)
SplitTree.Node.remove(_:) 70.27% (26/37)
implicit closure #1 in SplitTree.Node.remove(_:) 100.00% (1/1)
SplitTree.Node.resizing(to:) 100.00% (16/16)
SplitTree.Node.leftmostLeaf() 87.50% (7/8)
SplitTree.Node.rightmostLeaf() 87.50% (7/8)
SplitTree.Node.equalize() 100.00% (4/4)
SplitTree.Node.equalizeWithWeight() 100.00% (30/30)
SplitTree.Node.weightForDirection(_:) 83.33% (10/12)
SplitTree.Node.calculateViewBounds(in:) 100.00% (50/50)
SplitTree.Node.viewBounds() 100.00% (26/26)
SplitTree.Node.spatial(within:) 100.00% (18/18)
SplitTree.Node.dimensions() 80.77% (21/26)
SplitTree.Node.spatialSlots(in:) 100.00% (53/53)
SplitTree.Spatial.slots(in:from:) 100.00% (47/47)
closure #1 in SplitTree.Spatial.slots(in:from:) 100.00% (1/1)
distance #1 <A>(from:to:) in SplitTree.Spatial.slots(in:from:) 100.00%
(6/6)
closure #2 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
implicit closure #1 in closure #2 in SplitTree.Spatial.slots(in:from:)
100.00% (1/1)
closure #3 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
closure #4 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
implicit closure #1 in closure #4 in SplitTree.Spatial.slots(in:from:)
100.00% (1/1)
closure #5 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
closure #6 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
implicit closure #1 in closure #6 in SplitTree.Spatial.slots(in:from:)
100.00% (1/1)
closure #7 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
closure #8 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
implicit closure #1 in closure #8 in SplitTree.Spatial.slots(in:from:)
100.00% (1/1)
closure #9 in SplitTree.Spatial.slots(in:from:) 100.00% (3/3)
SplitTree.Spatial.doesBorder(side:from:) 100.00% (20/20)
closure #1 in SplitTree.Spatial.doesBorder(side:from:) 100.00% (1/1)
closure #2 in SplitTree.Spatial.doesBorder(side:from:) 100.00% (3/3)
static SplitTree.Node.== infix(_:_:) 100.00% (13/13)
SplitTree.Node.init(from:) 66.67% (12/18)
SplitTree.Node.encode(to:) 100.00% (11/11)
SplitTree.Node.leaves() 100.00% (9/9)
SplitTree.makeIterator() 100.00% (3/3)
implicit closure #1 in SplitTree.makeIterator() 100.00% (1/1)
SplitTree.Node.makeIterator() 0.00% (0/3)
SplitTree.startIndex.getter 100.00% (3/3)
SplitTree.endIndex.getter 100.00% (3/3)
implicit closure #1 in SplitTree.endIndex.getter 100.00% (1/1)
SplitTree.subscript.getter 100.00% (5/5)
implicit closure #1 in SplitTree.subscript.getter 100.00% (1/1)
implicit closure #2 in implicit closure #1 in SplitTree.subscript.getter
100.00% (1/1)
implicit closure #3 in SplitTree.subscript.getter 0.00% (0/1)
implicit closure #4 in SplitTree.subscript.getter 0.00% (0/1)
SplitTree.index(after:) 100.00% (4/4)
implicit closure #1 in SplitTree.index(after:) 100.00% (1/1)
implicit closure #2 in SplitTree.index(after:) 0.00% (0/1)
SplitTree.Node.structuralIdentity.getter 100.00% (3/3)
SplitTree.Node.StructuralIdentity.init(_:) 100.00% (3/3)
static SplitTree.Node.StructuralIdentity.== infix(_:_:) 100.00% (3/3)
SplitTree.Node.StructuralIdentity.hash(into:) 100.00% (3/3)
SplitTree.Node.isStructurallyEqual(to:) 100.00% (18/18)
implicit closure #1 in SplitTree.Node.isStructurallyEqual(to:) 100.00%
(1/1)
implicit closure #2 in SplitTree.Node.isStructurallyEqual(to:) 100.00%
(1/1)
SplitTree.Node.hashStructure(into:) 100.00% (14/14)
SplitTree.structuralIdentity.getter 100.00% (3/3)
SplitTree.StructuralIdentity.init(_:) 100.00% (4/4)
static SplitTree.StructuralIdentity.== infix(_:_:) 100.00% (4/4)
implicit closure #1 in static SplitTree.StructuralIdentity.==
infix(_:_:) 100.00% (1/1)
SplitTree.StructuralIdentity.hash(into:) 80.00% (8/10)
static SplitTree.StructuralIdentity.areNodesStructurallyEqual(_:_:)
90.00% (9/10)
  </pre>
</details>

I chose this as a good place to start contributing to Ghostty because I
was curious about the macOS implementation, and there was a specific
request for help with testing (#7879).

My process for writing the tests was basically reading
[SplitTree.swift](./macos/Sources/Features/Splits/SplitTree.swift) to
understand it, then writing tests for each high-level method and
checking against code coverage to capture all the code paths:

## Running
```bash
rm -rf /tmp/ghostty-test.xcresult
xcodebuild -project macos/Ghostty.xcodeproj \
    -scheme GhosttyTest \
    -configuration Debug \
    test \
    -destination 'platform=macOS' \
    -enableCodeCoverage YES \
    -resultBundlePath /tmp/ghostty-test.xcresult \
    -only-testing:GhosttyTests/SplitTreeTests \
    2>&1 | xcbeautify
```

## Coverage
```bash
xcrun xccov view --report /tmp/ghostty-test.xcresult | grep 'SplitTree\.'
```

This was originally implemented in [~38
commits](https://github.com/pouwerkerk/ghostty/pull/1/commits), but I
squashed them down to 1 commit for easier review.

## AI Disclosure
The tests were written by me, but I used Opus 4.6 to explain some parts
of the code, and then finally to provide feedback on the tests. It
suggested tests for `nodeStructuralIdentityInSet` and
`nodeStructuralIdentityDistinguishesLeaves` as well as [the
Parameterized
test](6a0bca43f6),
`resizingAdjustsRatio`, which seemed like a clever way to collapse 12
individual tests into 3 parameterized ones that still run 12 cases
total. I didn't know this feature existed, and it seems like a great way
to write tests that are more maintainable. I read this relatively new
feature in the [Swift
Docs](https://developer.apple.com/documentation/testing/parameterizedtesting).
I find this to be a particularly useful feature of Claude/related
agents, where it can suggest better ways of writing something in a more
idiomatic way, and it taught me something new, which is always fun.

I'm more than happy to continue work on tests for #7879 and always
welcome to any feedback you have.
2026-02-17 16:18:53 -08:00
David Matos
6d71f40907 Fix typo 2026-02-17 23:51:42 +01:00
David Matos
3779e469df Remove extra space 2026-02-17 23:48:16 +01:00