123 Commits

Author SHA1 Message Date
Mitchell Hashimoto
200aee9acf macos: rework toggle_visibility to better match iTerm2
Two major changes:

1. Hiding uses `NSApp.hide` which hides all windows, preserves tabs, and
   yields focus to the next app.

2. Unhiding manually tracks and brings forward only the windows we hid.
   Proper focus should be retained.
2025-01-10 14:40:02 -08:00
Soh Satoh
e2523c25cb Add quick-terminal-space-behavior option 2025-01-08 11:02:19 -08:00
Evelyn Harthbrooke
dc4774c147 macOS: fixup Photo Library description to make more sense. 2025-01-06 07:13:53 -07:00
Evelyn Harthbrooke
ae0248b5bc macOS: Add Bluetooth permission description; fixup other descs.
Adds the missing Bluetooth permission description to ghostty's Xcode
project description, and fixes up existing permissions to be clearer.

Closes #3995 and #4512.
2025-01-06 07:10:50 -07:00
Mitchell Hashimoto
4ffd281de3 macos: detect IME input source change as part of keyDown event
Fixes #4539

AquaSKK is a Japanese IME (Input Method Editor) for macOS. It uses
keyboard inputs to switch between input modes. I don't know any other
IMEs that do this, but it's possible that there are others. Prior to
this change, the keyboard inputs to switch between input modes were
being sent to the terminal, resulting in erroneous characters being
written.

This change adds a check during keyDown events to see if the input
source changed _during the event_. If it did, we assume an IME captured
it and we don't pass the event to the terminal.

This makes AquaSKK functional in Ghostty.
2025-01-04 21:45:25 -08:00
Mitchell Hashimoto
e05c3b6fd7 macos: alphabetize resources in xcode project 2025-01-04 20:30:42 -08:00
Mitchell Hashimoto
3e89c4c2f4 Key events return boolean if handled 2025-01-04 13:36:40 -08:00
Mitchell Hashimoto
8b8c53fc4c macos: add NSEvent extension to convert to libghostty key events 2025-01-04 12:45:15 -08:00
Bryan Lee
c011c4622d macos: add generated Nvim files to app bundle 2024-12-30 17:01:48 +08:00
Mitchell Hashimoto
6508fec945 Revert "macos: disable auto-updates for local (source) builds (#3273)"
This reverts commit b39850fd8b463f78c6fb450cd7a59e43bdf4b622, reversing
changes made to 64ea3a1a29677ca5f094f8058c40c549bb741bc5.
2024-12-29 09:22:54 -08:00
Jon Parise
2c3847c9af macos: disable Sparkle checks in Debug and Release
This approach uses Xcode's Info.plist preprocessing to conditionally set
`SUEnableAutomaticChecks=false` for the Debug and Release build schemes.
It is unset for the ReleaseLocal scheme.

When this Info.plist key is explicitly set to false (as it is for these
build schemes), we disable auto-updates at runtime. Otherwise, we apply
the behavior defined by our "auto-update" configuration.
2024-12-27 08:16:18 -05:00
Mitchell Hashimoto
adba2036e3 macos: custom app icon goes into About window 2024-12-21 19:31:30 -08:00
Mitchell Hashimoto
c4bec781b0 macos: colorized Ghostty icon begins! 2024-12-21 19:31:30 -08:00
Jon Parise
717425ca07 macos: add zsh to the application bundle 2024-12-16 19:40:31 -05:00
Jon Parise
f81bb892c0 macos: add bash-completion to the application bundle 2024-12-16 08:38:55 -05:00
Mitchell Hashimoto
958316d851 Merge pull request #2770 from ghostty-org/push-xptpwxwxvwxs
macos: update recommended Xcode settings
2024-11-22 12:37:19 -08:00
Mitchell Hashimoto
523307e958 macos: update recommended Xcode settings
I genuinely don't know what they do, but Xcode recommended it and
cursory docs reading seems to indicate its safe. I don't think it'll
result in any noticeable changes.
2024-11-22 12:00:38 -08:00
Mitchell Hashimoto
ddde68d1f4 macos: add NSAppearance.isDark 2024-11-22 10:31:31 -08:00
Mitchell Hashimoto
3392659e1f Revert "macos: enable Metal shader logging"
This reverts commit aad101565abff3368af76e8c2e93cbe7c278a89f.
2024-11-20 15:01:27 -08:00
Mitchell Hashimoto
aad101565a macos: enable Metal shader logging
This enables the compile options and Xcode configuration so that logging
in Metal shaders shows up in our Xcode debug console. This doesn't add
any log messages, but makes it so that when we iterate on the shaders in
the future, we can add and see logs to help us out.
2024-11-19 18:59:41 -08:00
phillip-hirsch
a420496e95 feat: Add bat syntax highlighting to macOS package contents 2024-11-06 19:12:58 -05:00
Mitchell Hashimoto
de5ec5d83e macos: make move_tab work 2024-10-25 11:54:07 -07:00
Mitchell Hashimoto
70acb0d76e macos: clamp window size to screen size on screen parameter changes
Fixes #2462

This sets up a listener for screen parameter changes. This only triggers
when a screen is added, removed, or a parameter such as its resolution
changes. This doesn't trigger when a window is simply moved from one
screen to another.

On parameter change, we ensure that the window is within the bounds of
the screen. As an exception, if the window was previously already
outside the bounds of the screen, we don't move it back in.
2024-10-19 10:13:16 -07: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
ef5b835dc4 macos: only hide dock on the screen with the dock 2024-09-30 14:25:33 -07:00
Mitchell Hashimoto
718fa6042c macos: new fullscreen implementation 2024-09-30 09:42:46 -07:00
Mitchell Hashimoto
332e1a1494 macos: new FullscreenMode/Style architecture for fullscreen impls 2024-09-29 21:31:58 -07:00
Mitchell Hashimoto
ea46cb19e6 macos: use a different bundle identifier for debug builds
This is necessary to avoid conflicts with application data such
as permissions and preferences.
2024-09-29 16:16:55 -07:00
Mitchell Hashimoto
4f9d49b380 macos: handle multiple monitors properly 2024-09-28 20:52:22 -07:00
Mitchell Hashimoto
1570ef01a7 rename slide to quick terminal 2024-09-28 15:20:35 -07:00
Mitchell Hashimoto
50fb7331af macos: base class for terminal controller 2024-09-28 10:41:51 -07:00
Mitchell Hashimoto
bdd0070ffd macos: render a terminal in the slide window 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
93b2fe60f8 macos: start work on SlideTerminal, slides in window from top 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
1ad904478d Tap events, core API to handle global keybinds 2024-09-24 16:29:02 -07:00
Mitchell Hashimoto
554dd6ff95 macos: enable dead code stripping
This is a recommended Xcode setting, the binary _seems_ to run fine.
It eliminates a warning from builds and reduces the binary size.
2024-09-22 10:21:51 -07:00
Mitchell Hashimoto
d090384600 macos: fix non-AppKit builds 2024-09-21 10:22:14 -07:00
Mitchell Hashimoto
f9bd009ce5 macos: unhide cursor on clipboard confirmation 2024-09-21 09:59:40 -07:00
Mitchell Hashimoto
c6bbdfb7bf macos: remove EventSinkHostingView
This was breaking various other features:

  - Popovers stopped working
  - Split divider drag gestures stopped working

For now we document the top part of the window is draggable... we
can look into removing that limitation later.
2024-09-20 22:01:01 -07:00
Mitchell Hashimoto
578aaa1ba6 macos: DraggableWindowView helper (unused currently) 2024-09-20 20:45:27 -07:00
Qwerasd
16919488da macOS: add macos-titlebar-style = hidden
Hides titlebar without removing the other typical window frame elements
2024-09-20 16:11:51 -06:00
Mitchell Hashimoto
6b85a152d8 macos: fix deployment target back to 12.0 2024-09-19 16:43:43 -07:00
Mitchell Hashimoto
c3d6356a87 macos: show secure input overlay when it is enabled 2024-09-19 16:24:42 -07:00
Mitchell Hashimoto
0c38f40f0a macos: secure input manager, global option in app 2024-09-19 10:11:31 -07:00
Mitchell Hashimoto
3ba0787ec2 macOS: save dSYM files
The focus of this commit is to store the dSYM files associated with
official macOS builds. dSYM files allow us to map crash reports to
source.

The dSYM files are primarily uploaded to our official blob storage where
all releases are also stored. We also upload the dSYM files to Sentry
since I'm experimenting with using that for crash reproting (note:
manual crash reporting, no automatic network traffic).

This commit also changes our blob URLs for releases to use the full
Git SHA rather than a build number. This is much easier to trace back.
2024-08-28 21:33:32 -07:00
Mitchell Hashimoto
b35ba8982a macos: add man pages to app bundle 2024-07-01 08:43:50 -07:00
Mitchell Hashimoto
6c01d20eb7 macos: add string extension 2024-06-30 14:58:28 -07:00
Mitchell Hashimoto
c290a28667 macos: update Sparkle to 2.6.3
There are numerous fixes since our previous version (2.5.1) and I
believe at least one is one that users have hit where unarchiving didn't
work properly despite a properly built archive. I'm hoping this improves
that.

Besides this, there is one major security fix. I think it was low risk
to our project currently but I read through it and it is sensible to
protect against the case.
2024-06-29 08:11:36 -05:00
Mitchell Hashimoto
a198cc300e macos: add the debug menu item to the xcode run scheme 2024-04-09 21:20:46 -04:00
Qwerasd
d1ac0aff39 feat(macOS): Paste copied files as absolute paths.
Previously files would be pasted as only the filename. This commit
introduces an extension to NSPasteboard which provides a method to
consistently get the string contents of a pasteboard so that the
behavior can stay the same anywhere where we need to do that.
2024-03-07 20:53:48 -05:00
Pete Schaffner
3b6bac0121 Make special blending mode class more generic
This allows us to specify what kind of context we'd like our vibrant
layer to exist in (light or dark).
2024-02-11 00:53:18 +01:00