-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macOS] feat: Support Tabs in Quick Terminal #5370
base: main
Are you sure you want to change the base?
Conversation
animateOut() | ||
} | ||
|
||
@IBAction func newTab(_ sender: Any?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝
This is never called because the window is an NSPanel without a title bar. So, I removed it and added the observer for Ghostty.Notification.ghosttyNewTab
.
@@ -329,6 +329,9 @@ class TerminalManager { | |||
guard let surfaceView = notification.object as? Ghostty.SurfaceView else { return } | |||
guard let window = surfaceView.window else { return } | |||
|
|||
// return if window is not in our managed windows | |||
guard windows.contains(where: { $0.controller.window == window }) else { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝
If the window is not managed by the TerminalManager (which is usually the case when it is managed by the QuickTerminalManager), the process will be aborted. Without this, a new TerminalWindow would be created.
…e left (like native tabs)
be37844
to
98a0e07
Compare
related to #2329
This pull request implements a tab management feature for the Quick Terminal in the Ghostty for macOS.
macOS does not support tab management without a title bar. Therefore, this PR implements non-native tabs instead of using macOS native tabs.
Changes
Appearance
window-theme = dark
window-theme = light
Notes
The implementation is designed to work similarly to native tabs and to behave consistently with the (standard) terminal windows in Ghostty. However, there may be some aspects I might have overlooked. Please feel free to make any necessary fixes to the implementation as needed.