Commit Graph

13509 Commits (main)

Author SHA1 Message Date
Mitchell Hashimoto 4d757f0f28
macos: show tab color as header for menu item so its not grey 2025-12-11 14:43:26 -08:00
Mitchell Hashimoto 89bdee447f
macos: selected color in tab color menu should use target's color 2025-12-11 14:33:50 -08:00
Mitchell Hashimoto d77b7c32f9
feat(macos): add tab color picker to tab context menu (#9784)
<img width="1824" height="1488" alt="image"
src="https://github.com/user-attachments/assets/4a77f743-9eae-40bf-8cb4-d45d884a85a5"
/>
2025-12-11 14:27:25 -08:00
Mitchell Hashimoto 2331e17835
macos: change tab color label to circle 2025-12-11 14:18:57 -08:00
Jon Parise c0deaaba4e bash: use a shell command for shell integration
Prior to #7044, on macOS, our shell-integrated command line would be
executed under exec -l, which causes bash to be started as a login
shell. This matches the macOS platform norms.

The change to direct command execution meant that we'd skip that path,
and bash would start as a normal interactive (non-login) shell on macOS.
We fixed this in #7253 by adding `--login` to the `bash` direct command
on macOS.

This avoided some of the overhead of starting an extra process just to
get a login shell, but it unfortunately doesn't quite match the bash
environment we get when shell integration isn't enabled (namely, $0
doesn't get the login-shell-identifying "-" prefix).

Instead, this change implements the approach proposed in #7254, which
switches the bash shell integration path to use a .shell command, giving
us the same execution environment as the non-shell-integrated command.
2025-12-11 17:02:14 -05:00
Mitchell Hashimoto 6332fb5c01
macos: some cleanup 2025-12-11 13:59:06 -08:00
Mitchell Hashimoto f71a25a621
macos: make the tab color indicator SwiftUI 2025-12-11 13:57:39 -08:00
Mitchell Hashimoto c83bf1de75
macos: simplify terminal controller a bunch 2025-12-11 13:50:24 -08:00
Mitchell Hashimoto 1073e89a0d
macos: move context menu stuff in terminal window down to an ext 2025-12-11 13:40:01 -08:00
Mitchell Hashimoto f559bccc38
macos: clean up setting up the tab menu by using an NSMenu extension 2025-12-11 13:36:49 -08:00
Mitchell Hashimoto a0089702f1
macos: convert tab color view to SwiftUI 2025-12-11 13:27:51 -08:00
Jeffrey C. Ollie 5dd4e60c31
Fix typo in po/README_TRANS (#9870)
via the its -> via its
2025-12-11 10:06:54 -06:00
Jacob Sandlund 6addccdeeb Add shape Tai Tham vowels test 2025-12-11 10:48:28 -05:00
Mitchell Hashimoto 04913905a3
macos: tab color is codable for restoration 2025-12-11 07:24:46 -08:00
Mitchell Hashimoto 51589a4e02
macos: move TerminalTabColor to its own file 2025-12-11 07:23:51 -08:00
George Papadakis 1a65c1aae2 feat(macos): add tab color picker to tab context menu 2025-12-11 07:16:26 -08:00
Mitchell Hashimoto c45a762031
fix(terminal): increase grapheme_bytes instead of hyperlink_bytes during reflow (#9866)
Fixed: When reflowing content with many graphemes, the code incorrectly
increased hyperlink_bytes capacity
instead of grapheme_bytes, causing GraphemeMapOutOfMemory errors.

Added: An unit test for this specific issue. 

This PR was written primarily by Opus.

Closes: #9863
2025-12-11 07:06:51 -08:00
Devzeth b224b69054 fix(terminal): increase grapheme_bytes instead of hyperlink_bytes during reflow
When reflowing content with many graphemes, the code incorrectly increased hyperlink_bytes capacity
instead of grapheme_bytes, causing GraphemeMapOutOfMemory errors.
2025-12-11 07:03:12 -08:00
Mitchell Hashimoto 86503045e9
fix: prevent integer overflow in hash_map layoutForCapacity (#9871)
Closes #9862
2025-12-11 06:57:23 -08:00
Jacob Sandlund f4560390d7 Remove accidental changes to macos/text/run.ig 2025-12-11 09:35:52 -05:00
Jacob Sandlund 942f326c58 Merge remote-tracking branch 'origin/main' into shaping-positions 2025-12-11 09:32:01 -05:00
benodiwal 0d8c193bda
fix(terminal): prevent integer overflow in hash_map layoutForCapacity
Co-Authored-By: Sachin <sachinbeniwal0101@gmail.com>
2025-12-11 16:43:16 +05:30
Felipe M.B. 3b2f551dc0 Fix typo in po/README_TRANS
via the its -> via its
2025-12-11 07:54:20 -03:00
Jeffrey C. Ollie dd4493b153
Fix typo in po/README_CONTRIB (#9869)
Change translable to translatable.
2025-12-11 01:54:50 -06:00
Felipe M.B. f96aca7a3f Fix typo in po/README_CONTRIB
Change translable to translatable.
2025-12-11 04:13:19 -03:00
Mitchell Hashimoto 669733d597
macos: remove iOS signing (dev team) 2025-12-10 21:21:05 -08:00
Mitchell Hashimoto 4a6d551941
macos: don't put NSMenu extension in iOS build 2025-12-10 21:20:39 -08:00
Mitchell Hashimoto a531ea8b08
Add close tabs on the right action (#9783)
<img width="1694" height="1146" alt="image"
src="https://github.com/user-attachments/assets/f9e1e7e6-7cfe-4760-85fe-def7c10f4110"
/>
2025-12-10 21:09:13 -08:00
Mitchell Hashimoto 3352d5f081
Fix up close right description 2025-12-10 20:57:36 -08:00
Mitchell Hashimoto eb75d48e6b
macos: add xmark to other tab close items 2025-12-10 20:56:07 -08:00
Mitchell Hashimoto 1387dbefad
macos: target should be the correct target 2025-12-10 20:50:28 -08:00
Mitchell Hashimoto dc641c7861
macos: change to NSMenu extension 2025-12-10 20:47:15 -08:00
Mitchell Hashimoto f612e4632c
macos: clean up some style on tab bar context menu configuring 2025-12-10 20:43:43 -08:00
Jeffrey C. Ollie 01a75ceec4
benchmark: add option to microbenchmark OSC parser 2025-12-10 22:31:27 -06:00
Jeffrey C. Ollie cfdcd50e18
benchmark: generate more types of OSC sequences 2025-12-10 22:30:19 -06:00
Mitchell Hashimoto 4424451c59
macos: remove to "close to the right" 2025-12-10 20:28:27 -08:00
Jeffrey C. Ollie 10bac6a5dd
benchmark: use newer bytes api to generate ascii 2025-12-10 22:26:40 -06:00
Mitchell Hashimoto cca10f3ca8
Revert GTK UI changes, apple-sdk build stuff 2025-12-10 20:20:37 -08:00
George Papadakis 625d7274bf Add close tabs on the right action 2025-12-10 20:14:27 -08:00
Mitchell Hashimoto 894e8d91ba
macOS: fix tab context menu opens on macOS 26 with titlebar tabs (#9831)
Description:
Context menu works on tabs with titlebar-style=tabs on MacOS Tahoe 26

Closes #9817 

Demo:


https://github.com/user-attachments/assets/60eaae6e-a3ff-41eb-8c86-ba700490d6e2



Note:
- Tried first a passthrough-views approach, but AppKit’s internal
toolbar subviews continued intercepting right-clicks.
- Runtime subclassing proposed by Claude also worked but was rejected as
too fragile.
- Final solution routes secondary-click events at the window level using
sendEvent(_:), forwarding them to the tab bar only when the click is
visually within its bounds.

AI Disclosure:
AI (Claude Code and Codex) assisted with early explorations, but final
implementation was developed manually after evaluating and discarding
the unsafe subclassing approach proposed by Claude.
2025-12-10 20:12:30 -08:00
Mitchell Hashimoto 76c2de6088
macos: remove the tabBarView variable we can search it 2025-12-10 20:10:54 -08:00
Lukas 969bcbe8e3 Update macos/Sources/Features/Terminal/Window Styles/TitlebarTabsTahoeTerminalWindow.swift 2025-12-10 20:03:30 -08:00
Denys Zhak c0951ce6d8 macOS: fix tab context menu opens on macOS 26 with titlebar tabs 2025-12-10 20:03:30 -08:00
Mitchell Hashimoto 4a173052fb
macos: always use overlay scroller (#9865)
With this PR, the macos scrollbar always uses the overlay style. If the
OS preferred style is `.legacy`, we flash the scroller when the mouse is
moved over it, such that users can still click and drag without relying
on scroll wheels or gestures.

Implements #9610.

There are a few lines of code that could technically be removed after
this change as they're only needed to make surfaces work correctly with
the legacy scrollbar, but I decided to leave them in since they do no
harm (see code comments). This ensures correct behavior if, for whatever
reason, some corner case brings back the legacy scrollbar, or if someone
decides to experiment with scrollbar styles in the future.
2025-12-10 13:55:49 -08:00
Daniel Wennberg 93d77ae436 Always use overlay scroller, flash when mouse moved 2025-12-10 13:33:18 -08:00
Mitchell Hashimoto 7642b8bec4
build: highway system integration should default to false 2025-12-10 13:13:38 -08:00
Mitchell Hashimoto 143748a8d3
Add system integration for highway (#9642) 2025-12-10 13:00:46 -08:00
Mitchell Hashimoto af05397219
synthetic: make bytes generation more flexible (#9204) 2025-12-10 12:59:46 -08:00
Mitchell Hashimoto 260e6dea59
macOS: fix theme reloading (#9360)
### Background
After #9344, the Ghostty theme won't change after switching systems',
and reverting #9344 will bring back the issue it fixed.

The reason these two issues are related is because the scheme change is
based on changes of `effectiveAppearance`, which is also affected by
setting the window's `appearance` or changing
`NSAppearance.currentDrawing()`.

### Changes
Instead of observing `effectiveAppearance`, we now explicitly update the
color scheme of surfaces, so that we can control when it happens to
avoid callback loops and redundant updates.

### Regression Tests

- [x] #8282
- [x] Reloading with `window-theme = light` should update Ghostty with
the default dark theme with a dark window theme (break before
[#83104ff](83104ff27a))
- [x] `window-theme = light \n macos-titlebar-style = native` should
update Ghostty with the default dark theme with a light window theme
- [x] Reloading from the default config to `theme=light:3024
Day,dark:3024 Night \n window-theme = light`, should update Ghostty with
the theme `3024 Day` with a light window theme (break on
[#d39cc6d](d39cc6d478))
- [x] Using `theme=light:3024 Day,dark:3024 Night`; Switching the
system's appearance should change Ghostty's appearance (break on
[#d39cc6d](d39cc6d478))
- [x] Reloading from `theme=light:3024 Day,dark:3024 Night` with a light
window theme to the default config, should update Ghostty with the
default dark theme with a dark window theme
- [x] Reloading from the default config to `theme=light:3024
Day,dark:3024 Night \n window-theme=dark`, should update Ghostty with
the theme `3024 Night` with a dark window theme
- [x] Reloading from `theme=light:3024 Day,dark:3024 Night \n
window-theme=dark` to `theme=light:3024 Day,dark:3024 Night` with light
system appearance, should update Ghostty from dark to light
- [x] Reload with quick terminal open
2025-12-10 12:56:20 -08:00
Mitchell Hashimoto 581ed72efc
gtk: support GTK 4.20 media queries in runtime & custom css (#9520) 2025-12-10 12:55:25 -08:00