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

GTK: Add an option to hide window decorations when the window is maximized #3381

Closed
ansipunk opened this issue Dec 27, 2024 · 19 comments · Fixed by #5028
Closed

GTK: Add an option to hide window decorations when the window is maximized #3381

ansipunk opened this issue Dec 27, 2024 · 19 comments · Fixed by #5028
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Milestone

Comments

@ansipunk
Copy link

I find window decorations useless when the window is maximized, so I'd like to hide them to preserve screen space, since I use tmux for multiplexing the terminal. Foot has an option for that and I imagine it wouldn't be too difficult to implement it here.

@ohmsl
Copy link

ohmsl commented Dec 27, 2024

Could use
https://ghostty.org/docs/config/reference#window-decoration
if you want to always disable it

@ansipunk
Copy link
Author

@ohmsl then I'd lose the ability to pull edges and corners of the window, move it around when it's not maximized and would have to use a keybinding to toggle. I think it could be improved.

@ohmsl
Copy link

ohmsl commented Dec 27, 2024

Agreed, it should at least remove the window decorations when full screened, whether this needs to be an option I don't know but +1 from me

@ansipunk
Copy link
Author

ansipunk commented Dec 27, 2024

I'd be happy to continue using Foot, but I'd like to try out the new emulator. I love that it uses LibAdwaita to render its window decorations, as Foot, Alacritty and Kitty are really ugly at that. As far as I know, Foot is the only one that has a config option for hiding window decorations when maximized and the only one that supports incremental window resizing on Linux, however, it doesn't support font ligatures. It's fast as hell even without GPU acceleration and I'm really curious to see where Ghostty can take it.

Foot and Ghostty side by side:

Image

Ghostty maximized:

Image

Foot maximized:

Image

@mitchellh mitchellh added os/linux gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Dec 27, 2024
@mitchellh mitchellh changed the title Add an option to hide window decorations when the window is maximized GTK: Add an option to hide window decorations when the window is maximized Dec 27, 2024
@mitchellh
Copy link
Contributor

I prefer a discussion for feature requests but I'm willing to accept this one on the spot. It's a good idea.

This should only apply to GTK. macOS already has its own hidden decorations when fullscreen (that appear when you hover the mouse up top).

@isgj
Copy link

isgj commented Dec 27, 2024

IMO it should hide the decorations when it goes full-screen, not when the window is maximized.

@Pangoraw
Copy link
Member

Pangoraw commented Dec 27, 2024

@ansipunk would something like #2568 help ? Maybe combined with auto-hiding decorations on fullscreen.

@ansipunk
Copy link
Author

ansipunk commented Dec 27, 2024

@Pangoraw thanks, I'll keep an eye on that discussion, it indeed does look great. But I still believe that hiding decorations on maximized windows is simply good UX.

@yorickpeterse
Copy link
Collaborator

The trick I was using was to use ghostty --gtk-titlebar=false as this would result in a basic GTK titlebar, which did get hidden when enabling fullscreen mode. It seems that per 1.0.1 this approach no longer works, as --gtk-titlebar=false completely removes the title bar on Gnome.

In my case I use Neovim in Ghostty in fullscreen mode, and not being able to hide the title bar in full screen mode is rather annoying due to the amount of space it takes up.

@Doom4535
Copy link

Doom4535 commented Jan 1, 2025

I might add that an auto hide type behavior would be nice (like how the Windows taskbar can be configured to disappear when the mouse isn't near it), as the GUI buttons are convenient, but for smaller (and lower res) screens real-estate is at a premium and the decorations bar takes up a good amount of space (or at least on my Ubuntu system). I am using the window-decoration = false setting currently to work around this, but sometimes miss the buttons.

@ansipunk
Copy link
Author

ansipunk commented Jan 1, 2025

Please do not confuse full screen and maximized windows.

@jcollie
Copy link
Collaborator

jcollie commented Jan 1, 2025

I'd say that the titlebar and windows should be automatically hidden when the window goes into fullscreen, not maximized. For maximized the decorations and titlebar would not change, only the window would be bigger.

@ansipunk
Copy link
Author

ansipunk commented Jan 1, 2025

@jcollie this issue was created specifically for hiding decorations in maximized windows. For full screen windows create another one.

@ak1932
Copy link

ak1932 commented Jan 6, 2025

I think a better option would be to have auto hiding titlebar. The terminal Blackbox handles this pretty well. It hides the titlebar and when you move the cursor near the top it shows the titlebar. This way you don't have clutter as well as have resizable windows from corners, and a way to use the tab management ui that ghostty has.

@sergionexus
Copy link

@jcollie this issue was created specifically for hiding decorations in maximized windows. For full screen windows create another one.

I create another one and a subnormal deleted it. another good idea?

jcollie added a commit to jcollie/ghostty that referenced this issue Jan 13, 2025
@jcollie
Copy link
Collaborator

jcollie commented Jan 13, 2025

@jcollie this issue was created specifically for hiding decorations in maximized windows. For full screen windows create another one.

That's not the way maximized/fullscreened windows work in most Gnome applications. Maximized windows keep the titlebar and decorations, fullscreened windows do not.

@ansipunk

This comment has been minimized.

@pluiedev
Copy link
Contributor

pluiedev commented Jan 13, 2025

Please have basic courtesy when interacting with others in the issue tracker. No need to suddenly get hostile.

For the record, GNOME Console does not hide its header bar when maximized (see below, ignore the wonky font), which I think is default and expected behavior for GNOME/GTK apps.

I suspect the reason is that the header bar is sometimes used to place tabs, dropdown menus and other crucial UI elements. Disabling them when maximized will then make them inaccessible. (See GNOME Clocks as an example)

Not that I say we need to necessarily agree with everything GTK does, but we should at least give it more thought first.

@mitchellh
Copy link
Contributor

Please remain civil and kind @ansipunk.

I still think this is a good idea as an option. And I understand its for maximized windows. I can understand the reasoning for wanting this and I also think it's a good sign that other programs such as Foot offer this.

jcollie added a commit to jcollie/ghostty that referenced this issue Jan 13, 2025
Fixes ghostty-org#3381

Note that ghostty-org#4936 will need to be merged or you'll need to rely on Gnome's
default keybinding for unmaximizing a window (super+down).
mitchellh added a commit that referenced this issue Jan 13, 2025
jcollie added a commit to jcollie/ghostty that referenced this issue Jan 13, 2025
Fixes ghostty-org#3381

Note that ghostty-org#4936 will need to be merged or you'll need to rely on Gnome's
default keybinding for unmaximizing a window (super+down).
mitchellh added a commit that referenced this issue Jan 13, 2025
…5028)

Fixes #3381

Note that #4936 will need to be merged or you'll need to rely on Gnome's
default keybinding for unmaximizing a window (super+down).
@github-actions github-actions bot added this to the 1.1.0 milestone Jan 13, 2025
Aaron-212 pushed a commit to Aaron-212/ghostty that referenced this issue Jan 14, 2025
Aaron-212 pushed a commit to Aaron-212/ghostty that referenced this issue Jan 14, 2025
Fixes ghostty-org#3381

Note that ghostty-org#4936 will need to be merged or you'll need to rely on Gnome's
default keybinding for unmaximizing a window (super+down).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.