macos-titlebar-style hybrid mode between 'tabs' and 'hidden' #7331
Replies: 2 comments 6 replies
|
Ghostty does not have non-native tabs which might solve this issue it plans on having them eventually
tabs require a titlebar (ghostty draws a custom titlebar but still uses native tabs) this is why the quick terminal cannot have tabs currently as it does not have a titlebar
not possible from my understanding tabs require a titlebar like how i stated above im not a macos expert (as I dont own/use one) but I do know there are some limitations involved around using native tabs |
|
This is totally doable without going non-native. I don't know much about Swift, but a little StackOverflow goes a long way, and I was able to figure out a minimal proof-of-concept by applying the following diff: diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift
index f2868adb..0b6e8598 100644
--- a/macos/Sources/Features/Terminal/TerminalController.swift
+++ b/macos/Sources/Features/Terminal/TerminalController.swift
@@ -240,6 +240,10 @@ class TerminalController: BaseTerminalController {
window.titlebarFont = nil
}
+ window.standardWindowButton(.closeButton)?.isHidden = true
+ window.standardWindowButton(.miniaturizeButton)?.isHidden = true
+ window.standardWindowButton(.zoomButton)?.isHidden = true
+
// If we have window transparency then set it transparent. Otherwise set it opaque.
// Window transparency only takes effect if our window is not native fullscreen.(...then I noticed that the exact same three lines can be found further down in the same file, in the function that applies the Result: As you can see, there is still space set aside for the buttons, so this needs a bit more work. Then there's integrating with the config and making it optional. It should probably be a setting on its own, rather than an additional titlebar style, since it can equally well be combined with three of the four existing styles. Not sure if this is a setting the maintainers are willing to entertain, but at least it doesn't look particularly hard to implement. |





This is totally doable without going non-native. I don't know much about Swift, but a little StackOverflow goes a long way, and I was able to figure out a minimal proof-of-concept by applying the following diff: