20 Commits

Author SHA1 Message Date
Mitchell Hashimoto
984d123fe4 macos: support configuration via CLI arguments
This makes it so `zig build run` can take arguments such as
`--config-default-files=false` or any other configuration. Previously,
it only accepted commands such as `+version`.

Incidentally, this also makes it so that the app in general can now take
configuration arguments via the CLI if it is launched as a new instance
via `open`. For example:

    open -n Ghostty.app --args --config-default-files=false

This previously didn't work. This is kind of cool.

To make this work, the libghostty C API was modified so that
initialization requires the CLI args, and there is a new C API to try to
execute an action if it was set.
2025-07-05 21:31:23 -07:00
Mitchell Hashimoto
020976bf88 macos: address some feedback 2025-06-21 06:42:32 -07:00
Mitchell Hashimoto
f8bc9b547c macos: support env vars for surface config, clean up surface config 2025-06-21 06:39:20 -07:00
Mitchell Hashimoto
93f0ee2089 macos: GetTerminalDetails intent 2025-06-21 06:39:18 -07:00
Mitchell Hashimoto
51b9fa751a macos: disambiguate close tab vs close window for confirmation
This fixes an issue where pressing the red close button in a window or
the "x" button on a tab couldn't differentiate and would always close
the tab or close the window (depending on tab counts).

It seems like in both cases, AppKit triggers the `windowShouldClose`
delegate method on the controller, but for the close window case it
triggers this on ALL the windows in the group, not just the one
that was clicked.

I implemented a kind of silly coordinator that debounces
`windowShouldClose` calls over 100ms and uses that to differentiate
between the two cases.
2025-06-17 16:16:14 -07:00
Mitchell Hashimoto
202020cd7d macos: menu item symbols for Tahoe
This is recommended for macOS Tahoe and all standard menu items now have
associated images. This makes our app look more polished and native for
macOS Tahoe.

For icon choice, I tried to copy other native macOS apps as much as
possible, mostly from Xcode. It looks like a lot of apps aren't updated
yet. I'm absolutely open to suggestions for better icons but I think
these are a good starting point.

One menu change is I moved "reset font size" above "increase font size"
which better matches other apps (e.g. Terminal.app).
2025-06-14 19:44:24 -07:00
Mitchell Hashimoto
5f99670247 macos: tahoe titlebar tabs taking shape 2025-06-12 17:52:15 -07:00
Mitchell Hashimoto
6ae8bd737a macos: hide the reset zoom titlebar accessory when tab bar is shown 2025-06-12 15:13:23 -07:00
Mitchell Hashimoto
e5cb33e911 typos 2025-06-11 15:18:02 -07:00
Mitchell Hashimoto
a804dab288 macos: native terminal style works with new subclasses 2025-06-11 15:18:02 -07:00
Mitchell Hashimoto
3595b2a847 macos: transparent titlebar handles transparent background 2025-06-11 15:18:02 -07:00
Mitchell Hashimoto
6ce7f612a6 macos: transparent titlebar needs to be rehidden when tabs change 2025-06-11 15:18:02 -07:00
Mitchell Hashimoto
7d02977482 macos: add NSView hierarchy debugging code 2025-06-11 15:18:02 -07:00
Mitchell Hashimoto
4d33a73fc4 wip: redo terminal window styling 2025-06-11 15:18:02 -07:00
Mitchell Hashimoto
973a2afdde macos: make sure we're not registering unnecessary undos 2025-06-07 12:46:15 -07:00
Mitchell Hashimoto
5507ec0fc0 macos: compile errors in CI 2025-06-07 12:46:15 -07:00
Mitchell Hashimoto
493b1f5350 wip: undo 2025-06-07 12:46:13 -07:00
Mitchell Hashimoto
1966dfdef7 macos: moving some files around 2025-06-05 07:05:13 -07:00
Mitchell Hashimoto
aef61661a0 macos: fix up command palette, focusing 2025-06-05 07:05:12 -07:00
Mitchell Hashimoto
0fb58298a7 macos: focus split previous/next 2025-06-05 07:05:11 -07:00