Merge pull request #2476 from johnseth97/native-title-proxy-icons-macos

Native title proxy icons macos
This commit is contained in:
Mitchell Hashimoto
2024-10-23 09:57:53 -07:00
committed by GitHub
2 changed files with 11 additions and 2 deletions

View File

@ -232,9 +232,18 @@ class BaseTerminalController: NSWindowController,
func titleDidChange(to: String) {
guard let window else { return }
// Set the main window title
window.title = to
// Get the current working directory from the focused surface
if let pwd = focusedSurface?.pwd {
// Set the window's representedURL to the current working directory
window.representedURL = URL(fileURLWithPath: pwd)
} else {
// If we don't have a pwd, set representedURL to nil
window.representedURL = nil
}
}
func cellSizeDidChange(to: NSSize) {

View File

@ -211,7 +211,7 @@ class TerminalController: BaseTerminalController {
window.restorationClass = TerminalWindowRestoration.self
window.identifier = .init(String(describing: TerminalWindowRestoration.self))
}
// If window decorations are disabled, remove our title
if (!ghostty.config.windowDecorations) { window.styleMask.remove(.titled) }