48 Commits

Author SHA1 Message Date
Mitchell Hashimoto
17cae57f51 Introduce reset_window_size keybinding and apprt action
Related to #6035

This implements the keybind/action portion of #5974 so that this can
have a binding and so that other apprts can respond to this and
implement it this way.
2025-02-28 15:31:17 -08:00
Mitchell Hashimoto
58ab66f094 macos: add a variety of artist-drawn alternate icons
This is just a fun change to add a bunch of alternate icons. We don't
want to add too many since this increases the final bundle size but we
also want to have some fun. :)
2025-02-11 14:51:43 -08:00
Bryan Lee
140ac93884 Add close_tab keybinding action for macOS
Implement `close_tab` keybinding action to close the current tab and all splits within that tab.
2025-01-08 12:04:40 -08:00
Wes Campaigne
e86b9a112e Implement "Paste Selection" on macOS like Terminal.app 2025-01-08 09:26:13 -08:00
Daniel Patterson
a4daabb28a Rename goto_split top/bottom directions to up/down. 2024-12-27 14:56:48 +00:00
Mitchell Hashimoto
1f468202d4 macos: add macos-icon-frame and some custom frame styles 2024-12-21 19:48:24 -08:00
Mitchell Hashimoto
abf713feec macos: support the macos-icon configurations 2024-12-21 19:31:30 -08:00
Mitchell Hashimoto
8f15f1a066 Make Ghostty release channel aware
Ghostty now has a release channel build configuration. Current valid
values are "tip" and "stable" but I imagine more will be added in the
future.

The release channel is inferred whether the version we specify with the
`-Dversion-string` build flag has a prerelease tag or not. If it does,
the release channel is "tip". If it doesn't, the release channel is
"stable".

This also adds a configuration to specify the release channel for
auto-updates for the macOS application.
2024-12-20 14:21:59 -08:00
Mitchell Hashimoto
7fb86a3c9c macos: listen for color change property to update window appearance 2024-11-21 13:37:54 -08:00
Mitchell Hashimoto
35fcb1a29b macos: change config access to evented, derived config like libghostty
Previously, we would access the `ghostty.config` object from anywhere.
The issue with this is that memory lifetime access to the underlying
`ghostty_config_t` was messy. It was easy when the apprt owned every
reference but since automatic theme changes were implemented, this isn't
always true anymore.

To fix this, we move to the same pattern we use internally in the core
of ghostty: whenever the config changes, we handle an event, derive our
desired values out of the config (copy them), and then let the caller
free the config if they want to. This way, we can be sure that any
information we need from the config is always owned by us.
2024-11-21 11:36:51 -08:00
Mitchell Hashimoto
3afb9065f0 macos: listen for config change and post a notification 2024-11-21 10:30:27 -08:00
Mitchell Hashimoto
28751ae5b8 Merge pull request #2485 from axdank/move_current_Tab
gui: add move_current_tab action
2024-10-25 14:15:16 -07:00
Mitchell Hashimoto
de5ec5d83e macos: make move_tab work 2024-10-25 11:54:07 -07:00
johnseth97
c3efda93f4 Converted config declaration to an enum 2024-10-24 23:02:50 -04:00
Mitchell Hashimoto
eec77e271c macos: change our minimum version to macOS 13
macOS 12 is officially EOL by Apple and the project only supports
officially supported versions of macOS. Once publicly released, users on
older macOS versions will have to use older released builds.
2024-10-09 14:41:57 -07:00
Mitchell Hashimoto
8994a8c627 macos: implement key sequence UI 2024-10-08 21:58:53 -07:00
Mitchell Hashimoto
78b9636d15 macos: apply background opacity to quick terminal
Fixes #2331
2024-09-30 21:18:47 -07:00
Mitchell Hashimoto
4ae20212bf libghostty: unified action dispatch
First, this commit modifies libghostty to use a single unified action
dispatch system based on a tagged union versus the one-off callback
system that was previously in place. This change simplifies the code on
both the core and consumer sides of the library. Importantly, as we
introduce new actions, we can now maintain ABI compatibility so long as
our union size does not change (something I don't promise yet).

Second, this moves a lot more of the functions call on a surface into
the action system. This affects all apprts and continues the previous
work of introducing a more unified API for optional surface features.
2024-09-26 22:00:11 -07:00
pnodet
7ff9af1520 style(macos): cleanup trailing spaces 2024-08-21 21:53:09 +02:00
Łukasz Niemier
f9be02a20f chore: clean up typos 2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
376345dcae macos: detect renderer health failures and show error view 2024-01-16 11:27:18 -08:00
Mitchell Hashimoto
875a774d4b macos: remove AppState and unify onto Ghostty.App cross-platform 2024-01-14 19:35:57 -08:00
Mitchell Hashimoto
4d9fd2becc macos: iOS app can initialize Ghostty 2024-01-14 14:44:16 -08:00
Gregory Anders
86b7442f3c macos: implement desktop notifications 2023-11-15 11:21:30 -06:00
Gregory Anders
98b43007a0 core: use ClipboardRequestType instead of ClipboardPromptReason
Instead of making a separate enum that must be translated from the
ClipboardRequest type, simply re-use ClipboardRequest to determine the
clipboard confirmation reason.
2023-11-10 23:12:39 -05:00
Gregory Anders
86245ff0cf macos: add option to prompt user for confirmation on OSC 52 commands 2023-11-10 23:12:39 -05:00
Gregory Anders
cd01340cce macos: add key binding for equalizing split sizes 2023-11-07 16:23:28 -06:00
Gregory Anders
9b14398153 macos: support resizing splits 2023-11-05 20:42:59 -06:00
Mitchell Hashimoto
ef44551522 apprt/embedded: hook up paste confirmation 2023-11-05 09:20:16 -08:00
Mitchell Hashimoto
29bbcbbf92 core: add input binding to control terminal inspector 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
52ccef3b8e macos: only re-render the inspector when requested 2023-10-24 15:27:14 -07:00
Mitchell Hashimoto
cc8e1cd936 macos: support initial window size 2023-09-30 20:47:31 -07:00
Mitchell Hashimoto
4570356e57 turn zoom into a toggle rather than an explicit zoom/unzoom 2023-09-02 16:03:51 -07:00
Mitchell Hashimoto
70bdc21d22 macos: support zoomed splits 2023-09-02 15:51:10 -07:00
Mitchell Hashimoto
1626c8cd3a macos: hacks for split focus to work correctly on macos 12 2023-09-02 09:15:50 -07:00
Thorsten Ball
a76aea4d0a macOS: new split can inherit font size 2023-08-19 09:59:04 +02:00
Thorsten Ball
2e9b787668 macOS: new window can inherit font size
This is the second part of #281 and adds the same mechanism that was
added for tabs in #296 for windows.

It works exactly the same way.
2023-08-19 09:29:56 +02:00
Mitchell Hashimoto
79971c62a6 macos: pass around a base surface_config_s rather than a new tab 2023-08-18 09:09:43 -07:00
Thorsten Ball
d2dae7a696 macOS: inherit font size when creating new tab
This is one part of #281.
2023-08-17 20:56:56 +02:00
Thorsten Ball
b56ffa6285 Add config setting to turn non-native fullscreen on or off 2023-08-04 14:12:33 -07:00
Thorsten Ball
8e464db049 Toggle fullscreen on super/ctrl+return, only macOS for now
This fixes or at least is the first step towards #171:

- it adds `cmd/super + return` as the default keybinding to toggle
  fullscreen for currently focused window.
- it adds a keybinding handler to the embedded apprt and then changes
  the macOS app to handle the keybinding by toggling currently focused
  window.
2023-07-02 20:23:49 +02:00
Thorsten Ball
6ff3f62e3a macOS: implement cmd+[0-9] to goto tab
This is my attempt at fixing #63. It works! But:

1. The `NotificationCenter` subscription is triggered once for every
   open tab. That's obviously wrong. But I'm not sure and could use some
   pointers where else to put the subscription. That leads me to...
2. I'm _not_ knowledgable in Swift/AppKit/SwiftUI, so I might have put
   the wrong/right things in the wrong/right places. For example: wasn't
   sure what's to be handled in Swift and what's to be handled by the
   core in Zig.

Would love some pointers :)
2023-07-01 09:08:02 -07:00
Mitchell Hashimoto
f092cce69e macos: translate ASCII keys 2023-03-25 15:26:04 -07:00
Mitchell Hashimoto
3976da8149 macos: navigate splits directionally 2023-03-11 17:55:31 -08:00
Mitchell Hashimoto
04c38ef3b0 macos: change focus callback to use an enum so we can get other dirs 2023-03-11 17:44:00 -08:00
Mitchell Hashimoto
b582691185 macos: hook up all the bindings so we're ready to handle focus event 2023-03-11 16:22:04 -08:00
Mitchell Hashimoto
fa9ee0815f apprt/embedded: newSplit callback 2023-03-08 14:56:50 -08:00
Mitchell Hashimoto
1a3cd852f9 macos: massive reorg 2023-03-06 21:28:09 -08:00