ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

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

Open ghost opened this issue 1 year ago • 19 comments

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.

ghost avatar Dec 27 '24 11:12 ghost

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

ohmsl avatar Dec 27 '24 12:12 ohmsl

@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.

ghost avatar Dec 27 '24 12:12 ghost

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

ohmsl avatar Dec 27 '24 12:12 ohmsl

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

ghost avatar Dec 27 '24 12:12 ghost

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).

mitchellh avatar Dec 27 '24 17:12 mitchellh

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

isgj avatar Dec 27 '24 17:12 isgj

@ansipunk would something like https://github.com/ghostty-org/ghostty/discussions/2568 help ? Maybe combined with auto-hiding decorations on fullscreen.

Pangoraw avatar Dec 27 '24 18:12 Pangoraw

@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.

ghost avatar Dec 27 '24 23:12 ghost

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.

yorickpeterse avatar Jan 01 '25 15:01 yorickpeterse

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.

Doom4535 avatar Jan 01 '25 19:01 Doom4535

Please do not confuse full screen and maximized windows.

ghost avatar Jan 01 '25 20:01 ghost

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.

jcollie avatar Jan 01 '25 21:01 jcollie

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

ghost avatar Jan 01 '25 22:01 ghost

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.

ak1932 avatar Jan 06 '25 16:01 ak1932

@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?

sergionexus avatar Jan 12 '25 10:01 sergionexus

@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.

jcollie avatar Jan 13 '25 03:01 jcollie

@jcollie are you fucking with me? This issue is maximized specific and has its goals defined with a config option that is not enabled by default. Why every second person who comes to this issue feels the need to tell me that it actually should be for full screen windows?

ghost avatar Jan 13 '25 11:01 ghost

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.

pluiedev avatar Jan 13 '25 13:01 pluiedev

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.

mitchellh avatar Jan 13 '25 14:01 mitchellh