sway icon indicating copy to clipboard operation
sway copied to clipboard

Hide the titlebar

Open bl4ckb0ne opened this issue 2 years ago • 33 comments

Hiding the titlebar is done via a workaround to set the font size to 0 (see https://github.com/swaywm/sway/pull/7092 and #7408)

Font size 0 should not be allowed, instead there should be a proper way to hide the titlebars done via the config file.

Ref:

#7350, https://github.com/swaywm/sway/issues/6946, https://github.com/swaywm/sway/issues/5050 and https://github.com/swaywm/sway/issues/1286

bl4ckb0ne avatar Jan 30 '23 20:01 bl4ckb0ne

I am at my limit, I have the 0.01 height bandaid. but I keep pressing it with my mouse if I am using chrome and jumping to another window that is behind. I know this is not part of i3 but I could use sway befor they "fixed" it.

Inginn avatar Feb 06 '23 17:02 Inginn

I'd love to do this on a per-client basis. Some clients already draw functional titlebars, so I'd want to disable titlebars for those specifically.

Given that this needs to be designed from scratch, does applying it on a per-client basis sound reasonable? The all-windows use case can be covered by simply:

for_window * titlebar hide

WhyNotHugo avatar Feb 20 '23 21:02 WhyNotHugo

The client can already indicate when they draw their own decorations with xdg_decoration. Only allowed for floating clients atm (otherwise we enforce ssd), though I don't remember why.

EDIT: tbh I'm not sure what the intended difference between border normal and border csd is right now anyway. We could probably be more permissive in allowing csd for single containers.

rpigott avatar Feb 20 '23 23:02 rpigott

Setting the default_border as pixel 0 i was able to get rid of the title bar

I am running version 1.8.2 in void

MarcioGCosta avatar Feb 26 '23 19:02 MarcioGCosta

We restored this workaround in 1.8.2 until a proper feature is added.

rpigott avatar Feb 26 '23 19:02 rpigott

A feature similar to smart_gaps would be great as well: smart_titlebar on would only show the titlebar when two or more windows are visible in a workspace.

hashworks avatar Jun 06 '23 12:06 hashworks

Setting the default_border as pixel 0 i was able to get rid of the title bar

I am running version 1.8.2 in void

not work for me.

currently the only way to get rid of titlebar is setting font:

font pango:monospace 0

please do not remove this setting until we can provide a solution for it, my workflow adheres with it.

tmpm697 avatar Jul 24 '23 03:07 tmpm697

A feature similar to smart_gaps would be great as well: smart_titlebar on would only show the titlebar when two or more windows are visible in a workspace.

You can do that with hide_edge_borders --i3 smart

ShalokShalom avatar Aug 09 '23 06:08 ShalokShalom

Hm, that doesn't work for me. hide_edge_borders --i3 smart still shows a title bar even when only one tab is open. I guess I'll open a bug report later.

hashworks avatar Aug 10 '23 14:08 hashworks

I have it with:

gaps outer 0
gaps inner 0
hide_edge_borders --i3 smart
workspace_layout tabbed

Thats the entire config, and it works for me ™️

ShalokShalom avatar Aug 10 '23 19:08 ShalokShalom

I have it with:

gaps outer 0
gaps inner 0
hide_edge_borders --i3 smart
workspace_layout tabbed

Thats the entire config, and it works for me ™️

there's still title to distinguish between tabs, I find no way to get rid of titlebar completely execpt this font hack: font pango:monospace 0

tmpm697 avatar Aug 10 '23 20:08 tmpm697

Is there any workaround which can highlight the active windows & hide the title bar?

Here's what I've tried:

  • font pango:monospace 0 shows Invalid font size
  • font pango:monospace 0.001 leaves a small bar above every window
  • default_border none removes titlebar but doesn't highlight which window is active

GrabbenD avatar Aug 23 '23 09:08 GrabbenD

Is there any workaround which can highlight the active windows & hide the title bar?

Here's what I've tried:

  • font pango:monospace 0 shows Invalid font size
  • font pango:monospace 0.001 leaves a small bar above every window
  • default_border none removes titlebar but doesn't highlight which window is active

try this:

font pango:monospace 0
default_border none

worked for me

tmpm697 avatar Aug 23 '23 10:08 tmpm697

font pango:monospace 0
default_border none

This doesn't work with 1.9.0-dev (git) due to Invalid font size. Is there a new method?

GrabbenD avatar Aug 23 '23 14:08 GrabbenD

No. This issue is about adding a new method. If this issue stays unresolved by the time 1.9 ships, there will be no more way to hide the titlebar.

emersion avatar Aug 23 '23 14:08 emersion

So make this a blocker?

ShalokShalom avatar Aug 23 '23 16:08 ShalokShalom

No. It's up to people who care about this feature to submit a PR.

emersion avatar Aug 23 '23 16:08 emersion

@emersion why clean it so fast as we haven't yet come up with an PR?

I have two layouts, one that adheres with that font trick, one curently use (was named unuse).

tmpm697 avatar Aug 23 '23 16:08 tmpm697

A feature similar to smart_gaps would be great as well: smart_titlebar on would only show the titlebar when two or more windows are visible in a workspace.

You can do that with hide_edge_borders --i3 smart

TYSM! I was always bothered by sway not behaving the same way as i3 when it comes to having no borders when using tabs, and this makes sway behave closer to i3. This really should be the default behavior, since sway is usually pretty obsessive over being 1-to-1 with i3.

iguanajuice avatar Oct 15 '23 01:10 iguanajuice

Reminder that a new Sway release is upcoming and this feature will go away unless someone steps up.

emersion avatar Dec 04 '23 15:12 emersion

Hi,

I did try something in #7889. It's not exactly a proper fix for this issue, but it provide a way to hide the titlebar when there is only one window, no matter which layout is configured.

Feedback is welcome :)

nim65s avatar Dec 29 '23 17:12 nim65s

added option 'disable_titlebar' in master branch https://github.com/swaywm/sway/pull/8026#issue-2163011746

neuromagus avatar Mar 01 '24 10:03 neuromagus

Still not having a proper option to disable titlebars on windows is silly to say the least.

y0nei avatar Mar 01 '24 21:03 y0nei

I'm done here. So, I don't know how merging works here and how long it will take for the corrected version to come out if my pull request is accepted, but I understand how titlebar in tiled WM can be annoying. Really!..

The spirit of DWM lives on, gentlemen. Here is a separate ~~hack~~ patch for Sway 1.9 and instruction ;)

neuromagus avatar Mar 02 '24 02:03 neuromagus

I'm done here. So, I don't know how merging works here and how long it will take for the corrected version to come out if my pull request is accepted, but I understand how titlebar in tiled WM can be annoying. Really!..

The spirit of DWM lives on, gentlemen. Here is a separate ~hack~ patch for Sway 1.9 and instruction ;)

Hello, is it possible to enable the titlebar only where there are a few windows present, but keep it disabled when there is a single one?

ghost avatar May 13 '24 09:05 ghost

nope. Or disable all (monocle mode/tiled) or enabled all ;} Maybe later I (or somebody) add this functional. But, for what? Titlebars eat up space.

neuromagus avatar May 13 '24 11:05 neuromagus

nope. Or disable all (monocle mode/tiled) or enabled all ;} Maybe later I (or somebody) add this functional. But, for what? Titlebars eat up space.

Whatever then. Also thought about the extra space that is being taken. Thanks for the patch btw, works like a charm! :)

ghost avatar May 13 '24 12:05 ghost

The current hack (which doesn't involve a patch with a10-stage build process) is really sub-optimal: if the mouse pointer touches that font pango:monospace 0.001 line, you will suddenly be looking a different tab. Very irritating.

As @neuromagus says

But, for what? Titlebars eat up space.

And @kit-ty-kate says in #7350

I've personally never seen any sway config or screenshot where the user kept the titlebar.

But the maintainers do not seem interested, possibly for the decent-ish reason that a "tabbed layout" without tabs is a bit weird.

And yet what people want here is exactly the UX you get on Android and iOS. No titlebars, just swipe (or key) left and right to get to another app (or window). On mobile nobody would imagine wasting space on titlebars, after all.

@emersion Would it not be logical therefore to fork tabbed into a new layout called mobile or micro or something. Ditch the titlebar there and call it a day?

Friptick avatar Aug 18 '24 11:08 Friptick

@Friptick, this is not "mobile" vision... If u want learn about mobile, read this guy - https://en.wikipedia.org/wiki/Jef_Raskin ("The Humane Interface"). IMO, I just want use ALL space in my screens. I know, where is open any programs (and write layouts config). This behavior reminds DWM stile (monocle layout). I love DWM, I very love Xmonad, but in the Wayland world we have "now" only wlroots... Wlroots -> Sway. And Sway have very big tabbars ;}

neuromagus avatar Aug 18 '24 12:08 neuromagus

OK true, you want tiling (not monocle) layout but without window chrome. And yes, tiling is not mobile UX (though 2 windows is possible on Android).

I was speculating about why the maintainers think this is superfluous.

Imagine 4 windows without titlebars:

  • tiling layout - this makes full sense, you can see what they contain already
  • stacking layout - a waste of space, but as least you can see how many windows there are
  • tabbed layout (basically "monocle" or "mobile") - no information about what the windows contain or how many there are

Maybe that is what is discouraging the maintainers.

My point is that a mobile (monocle) layout is the ultimate space-efficient tiling layout so it is entirely appropriate in this project if it stops pretending to be "tabbed".

Friptick avatar Aug 18 '24 14:08 Friptick