Commit Graph

1593 Commits

Author SHA1 Message Date
Joseph Martinsen
f4ddddc4b7 macos: refactor command finish notification duration handling 2026-02-26 13:17:19 -08:00
Joseph Martinsen
3b5a7b77d3 macos: implement notify on command finish 2026-02-26 13:12:29 -08:00
Mitchell Hashimoto
dcb7c9a4b8 macos: show the notification count number in the badge 2026-02-26 10:21:35 -08:00
Mitchell Hashimoto
5389fdfbaf macos: lint 2026-02-26 10:14:22 -08:00
Mitchell Hashimoto
454a89e011 macos: clean up badge request state 2026-02-26 10:10:42 -08:00
Mitchell Hashimoto
3aca722415 macos: further simplication of AppDelegate bell state 2026-02-26 09:52:26 -08:00
Mitchell Hashimoto
79ca4daea6 macos: try to clean up Appdelegate combine mess 2026-02-26 09:47:17 -08:00
Mitchell Hashimoto
ea8bf17df8 macos: use combine to coalesce bell values 2026-02-26 09:39:23 -08:00
Noah Bernsohn
c4766dff77 fix: restore terminalTitle variable removed in previous edit 2026-02-26 07:18:06 -08:00
Noah Bernsohn
62c1d50757 Update macos/Sources/Features/Command Palette/TerminalCommandPalette.swift
Co-authored-by: Lukas <134181853+bo2themax@users.noreply.github.com>
2026-02-26 07:18:06 -08:00
Noah Bernsohn
f38234bc5b apprt: show title override in command palette jump commands 2026-02-26 07:18:05 -08:00
Mitchell Hashimoto
e6da439e43 macos: style changes 2026-02-26 07:09:08 -08:00
Lukas
05a125533b macos: fix glass tinting when theme changes 2026-02-26 11:24:54 +01:00
Mitchell Hashimoto
1c3f7601a7 macos: pass last focused surface as env, use for focus detection
Fixes #10935

This is a more robust way to detect "is my surface focused" because that
question usually means "is my surface the last focused surface" if a
_different_ surface is not focused. We already have used this pattern
all over but we should extend it to SwiftUI too.
2026-02-25 14:01:12 -08:00
Mitchell Hashimoto
26146f54c5 update comments 2026-02-25 09:04:20 -08:00
Mitchell Hashimoto
da045d2fb3 Remove ObjCExceptionCatcher from iOS target 2026-02-25 09:00:52 -08:00
Mitchell Hashimoto
304823d560 macos: just some textual cleanup 2026-02-25 08:58:09 -08:00
Noah Gregory
58acab6c7d Merge branch 'ghostty-org:main' into fix-tabbing-from-tab-overview 2026-02-24 20:24:18 -05:00
Noah Gregory
dd4e36f921 macOS: fix crash when adding tab from tab overview 2026-02-24 18:08:45 -05:00
Mitchell Hashimoto
06084cd840 macos: various dock tile cleanups 2026-02-24 10:38:02 -08:00
Mitchell Hashimoto
f451ea8e46 macos: move icon codable/equatable to extension 2026-02-24 10:22:49 -08:00
Lukas
c72788894e ci: fix linting and delete non-useful tests 2026-02-24 10:13:24 +01:00
Lukas
f831f68f1a macOS: update AppIcon encoding
- make `ColorizedGhosttyIcon` codable
- remove deprecated string encoding introduced in tip
2026-02-24 09:51:30 +01:00
Mitchell Hashimoto
4b1178e4f6 macos: rename a bunch of files 2026-02-24 08:58:15 +01:00
Mitchell Hashimoto
2c28c27ca5 moving lots of files, removing unused stuff 2026-02-24 08:58:15 +01:00
Lukas
a79557f521 macOS: stop cycling icons when AboutWindow is closed
and start cycling with current icon
2026-02-24 08:58:15 +01:00
Lukas
45525a0a85 macOS: use NSDockTilePlugIn to update app icons 2026-02-24 08:58:14 +01:00
Martin Emde
40e6a6dd58 Refine spacing and header usage
This is 4pt header space, 12pt clickable frame height
2026-02-23 12:04:07 -08:00
Martin Emde
2842b18a3f Only show drag handle on hovered surface 2026-02-23 12:04:07 -08:00
Martin Emde
47577c7623 Make top visual space for surface drag handles 2026-02-23 12:03:45 -08:00
Mitchell Hashimoto
6a9a21afb6 macOS: Add inactive window tint overlay for liquid glass (#10943)
**Summary:**
- Add tint overlay to dim terminal windows when inactive, fixes
https://github.com/ghostty-org/ghostty/discussions/10040
- Refactor the liquid glass effect into a dedicated `TerminalGlassView`
class

Note: The tint overlay color and opacity values may not be ideal —
feedback is welcome.

**AI Disclosure:** I used Claude Code to read the macos repo and
understand the liquid glass implementation. Implemented basic tint
overlay mainly by hand. Refactor the code and review changes with Claude
Code.
2026-02-23 09:01:25 -08:00
Mitchell Hashimoto
f5e2561eb7 macos: rename to TabTitleEditor 2026-02-23 08:38:10 -08:00
Mitchell Hashimoto
b6a9d54e98 macos: extract inline title editing to standalone file 2026-02-23 08:38:09 -08:00
MiUPa
879d7cf337 macOS: remove dead tab title edit helper 2026-02-23 08:38:09 -08:00
MiUPa
368e190a41 macOS: defer inline tab rename start to reduce flicker 2026-02-23 08:38:09 -08:00
MiUPa
f6e9b19fd5 macOS: widen inline tab title editor 2026-02-23 08:38:09 -08:00
MiUPa
feee4443da macOS: add inline tab title editing 2026-02-23 08:38:09 -08:00
MiUPa
daa2a9d0d5 macos: allow renaming tab title on double-click 2026-02-23 08:38:09 -08:00
miracles
81c9c81ae3 Refactor glass effect into TerminalGlassView and add inactive window tint overlay 2026-02-22 21:58:33 -08:00
Jon Parise
dd29617cd3 macos: swiftlint 'multiple_closures_with_trailing_closure' rule
Also, re-enable the 'force_cast' rule, which was addressed earlier.
2026-02-21 10:17:15 -08:00
Tristan Partin
407b3c082f macos: fix new tab crash
It was introduced in 2a81d8cd2910b12fe007f0bc5fb5d6be57f0f0fe[0]. We
lost the subview. prefix of from the contains() call.

Co-authored-by: Brent Schroeter <github@brentsch.com>
Fixes: https://github.com/ghostty-org/ghostty/issues/10923
Link: 2a81d8cd29 [0]
2026-02-21 09:08:04 -06:00
Mitchell Hashimoto
2a81d8cd29 macos: swiftlint 'for_where' rule (#10909) 2026-02-20 21:06:47 -08:00
Mitchell Hashimoto
ce46caeacb macos: swiftlint 'switch_case_alignment' rule (#10908) 2026-02-20 21:02:46 -08:00
Mitchell Hashimoto
6ec8744b16 macOS: expand tilde in file paths before opening (#10863)
## Summary

Cmd-clicking a file path containing `~` (e.g. `~/Documents/file.txt`)
fails to open the file on macOS because `URL(filePath:)` treats `~` as a
literal directory name rather than the user's home directory.

This uses `NSString.expandingTildeInPath` to resolve `~` before
constructing the file URL.

## Root Cause

In `openURL()`, when the URL string has no scheme it falls through to:

```swift
url = URL(filePath: action.url)
```

Swift's `URL(filePath:)` does not perform tilde expansion. A path like
`~/Documents/file.txt` produces a URL pointing to a non-existent file,
and `NSWorkspace.open` silently fails.

## Fix

```swift
let expandedPath = NSString(string: action.url).expandingTildeInPath
url = URL(filePath: expandedPath)
```

## Reproduction

1. Have a terminal application (e.g. Claude Code) that outputs file
paths with `~` prefixes
2. Cmd-click the path in Ghostty on macOS
3. The file does not open (fails silently)

With this fix, the path resolves correctly and opens in the default
editor.
2026-02-20 20:56:27 -08:00
Alex Feijoo
b65261eb66 macOS: expand tilde in file paths before opening
`URL(filePath:)` treats `~` as a literal directory name, so
cmd-clicking a path like `~/Documents/file.txt` would fail to
open because the resulting file URL doesn't point to a real file.

Use `NSString.expandingTildeInPath` to resolve `~` to the user's
home directory before constructing the file URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:37:54 -08:00
Jon Parise
2d6fa92d78 macos: swiftlint 'for_where' rule 2026-02-20 19:42:48 -05:00
Jon Parise
f7e6639c43 macos: swiftlint 'switch_case_alignment' rule 2026-02-20 19:18:40 -05:00
Mitchell Hashimoto
5db9f03f62 macos: swiftlint 'no_fallthrough_only' rule (#10899)
This rule is generally trying to be helpful, but it doesn't like a few
places in our code base where we're intentionally listing out all of the
well-known cases. Given that, just disable it.

https://realm.github.io/SwiftLint/no_fallthrough_only.html
2026-02-20 13:39:31 -08:00
Mitchell Hashimoto
2ed341495f macos: optimize secure input overlay animation (#10903)
Addresses discussion in #3729 and issues relating to #7333, #9590, and
#9617.

Rendering the Secure Keyboard Input overlay using innerShadow() can
strain the resources of the main thread, leading to elevated CPU load
and in some cases extended disruptions to the main thread's
DispatchQueue that result in lag or frozen frames. This change achieves
the same animated visual effect with ~35% lower CPU usage and resolves
most or all of the terminal rendering issues associated with the
overlay.
2026-02-20 13:39:14 -08:00
Jon Parise
3d3ea3fa59 macos: swiftlint 'no_fallthrough_only' rule
This rule is generally trying to be helpful, but it doesn't like a few
places in our code base where we're intentionally listing out all of the
well-known cases. Given that, just disable it.

https://realm.github.io/SwiftLint/no_fallthrough_only.html
2026-02-20 13:01:30 -05:00