Skip to content
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

Modified window-decorations = none option on macOS to maintain rounded edges #2459

Conversation

johnseth97
Copy link
Contributor

@johnseth97 johnseth97 commented Oct 19, 2024

Most terminal emulators on MacOS that support the removal of window decorations do such by hiding the navigation controls and title, while making the titlebar transparent.

It's an aesthetic choice, but I believe that it does keep Ghostty's style more in line with the rounded look found on macOS

image

I do understand that some people don't like the extra padding caused by hiding the bar instead of removing it altogether, so another option would be to add multiple options for window-decorations on macOS.

window-decorations = none:

if (!ghostty.config.windowDecorations) { window.styleMask.remove(.titled) }

window-decorations = none_rounded:

if (!ghostty.config.windowDecorations) {
    window.titleVisibility = .hidden
    window.standardWindowButton(.closeButton)?.isHidden = true
    window.standardWindowButton(.miniaturizeButton)?.isHidden = true
    window.standardWindowButton(.zoomButton)?.isHidden = true
    window.titlebarAppearsTransparent = true
    window.styleMask.insert(.fullSizeContentView)
}

window-decorations = transparent:

if (!ghostty.config.windowDecorations) {
    window.titlebarAppearsTransparent = true
}

etc.

@JoshuaBrest
Copy link
Contributor

Maybe there could be a traffic lights config option. I imagine that people might want to do other things with that. This works too ig.

@johnseth97
Copy link
Contributor Author

At that granularity, you'd probably want individual options for "title -bar-window-controls", "title-bar-transparency", and "title-bar-text". Good news is that those options should work cross-platform as well.

@mitchellh
Copy link
Contributor

PRs aren't really the best place to discuss feature design. I like having this as an option but as you said, I've heard opinions where both are desired. I can't convert a PR to a discussion unfortunately, so it may be best to open a discussion in the ideas category to discuss how to do this further.

I have absolutely nothing against the technical implementation of this PR, but I do wonder what the correct UX in terms of configuration should be to expose this. I think turning window-decoration into an enum with some extra options may make sense.

I'm going to close this for now so we can discuss further (can you open a discussion?). The PR being closed still lets us reopen and see the diff so when we determine what the config is we want to expose we can come back around and merge this still.

Thanks!

@mitchellh mitchellh closed this Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants