swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.74k stars 1.11k forks source link

Hide the titlebar #7409

Open bl4ckb0ne opened 1 year ago

bl4ckb0ne commented 1 year ago

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

Inginn commented 1 year ago

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.

WhyNotHugo commented 1 year ago

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
rpigott commented 1 year ago

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.

MarcioGCosta commented 1 year ago

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

rpigott commented 1 year ago

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

hashworks commented 1 year ago

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.

tmpm697 commented 1 year ago

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.

ShalokShalom commented 1 year ago

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

hashworks commented 1 year ago

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.

ShalokShalom commented 1 year ago

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 ™️

tmpm697 commented 1 year ago

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

GrabbenD commented 1 year ago

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

Here's what I've tried:

tmpm697 commented 1 year ago

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

GrabbenD commented 1 year ago
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?

emersion commented 1 year ago

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.

ShalokShalom commented 1 year ago

So make this a blocker?

emersion commented 1 year ago

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

tmpm697 commented 1 year ago

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

iguanajuice commented 1 year ago

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.

emersion commented 11 months ago

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

nim65s commented 11 months ago

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

neuromagus commented 9 months ago

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

y0nei commented 9 months ago

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

neuromagus commented 9 months ago

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

ghost commented 6 months ago

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?

neuromagus commented 6 months ago

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.

ghost commented 6 months ago

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! :)

Friptick commented 3 months ago

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?

neuromagus commented 3 months ago

@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 ;}

Friptick commented 3 months ago

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:

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

neuromagus commented 3 months ago

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

ОМG... "Hot" is not "Red"!

I want option for disable "tabbar". If maintainers not implement this option, I can hack again in the next version of Sway, like this. And later, we can see alternatives (DWL or River or something else) with this option. Well, True way is here (for me) - https://discourse.haskell.org/t/xmonad-for-wayland-call-for-help/7812

epragalakis commented 1 month ago

whats blocking the fix @neuromagus ?

edit: the whole issue makes me sad because this was first raised in 2017 🫠

Friptick commented 1 month ago

Question seconded.

I love Sway but I'm getting fidgety waiting for the day I get my (1280x10=) 12,800 pixels of useless blank tab real estate back, to do whatever I want with.

Thanks to anyone working on this issue, your toil will be very appreciated.

neuromagus commented 4 weeks ago

Guys, as promised before, updated Sway -> updated my patch for disable titlebar! Here it is -> https://codeberg.org/neuromagus/disable_titlebar_in_sway

simple instruction for install: download Sway sources, download patch, extract all, apply patch patch -p1 < disable_titlebar_sway1-10.patch, set in Sway config new option disable_titlebar yes and enjoy!

P.S. I test with borders, looks nice (i mean top border showed normal), but... If you found any bugs, because this version of Sway have too much changes -> Welcome!

Friptick commented 2 weeks ago

Thank you @neuromagus for your work.

But unfortunately this issue cannot be considered fixed until the patch is incorporated into the project. Personally, I am just an ordinary end user, I have hardly any experience compiling software from source. Patching and compiling involves expertise and then ongoing maintenance. It is not really that "simple".

To the maintainers here: is there any roadmap at all for incorporating this feature? Or should it be considered "won't fix"? If so maybe it's time to tag it as such?

emersion commented 2 weeks ago

It's not a wontfix, but we're still in the process of figuring out what the command API should look like. Discussion in https://github.com/swaywm/sway/pull/8248.

neuromagus commented 2 weeks ago

@Friptick. This patch works on stable version. Need compile only once. Problem only one here - @emersion takes patches to ONLY in master branch. On RELEASED version all patches uses only external.

And now community have a "process of figuring" - as i understand - "we discuss, how this feature has release and looks" maybe in titlebars, maybe in borders, or, maybe in other place (design, i understand)...

2 lines of code ;} and discuss for discuss ;}, why not? My hack works now and next version of SwayWM released every 1 - 1.5 years... So, if u don't like titlebars and want use this WM now - use patch ;} Maybe later they will make a decision and we will get this functionality on next release, who know?

P.S. Sorry, guys, again. English is not my strong side.

fossdd commented 2 weeks ago

Thats how releases work. Once a release is stable and released it should only contain bug fixes and patches. New changes and features should always target the master branch.

Most users (including me) like the release model sway chose (to only release a new version once a year). Sway kinda is critical software. If your compositor doesn't start then you basically can't work, therefore it shouldn't bring new features (with probably new bugs) in stable releases. A release should be properly tested and stable.

Please target the master branch and collorborate with the developers. If people want to use new features the can use the master branch, if they want a stable version without new fancy features they should use the releases.

Piagno commented 2 weeks ago

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

Maybe I'm missing something, but I was able to remove the titlebar in v1.10 with: default_border pixel 2

neuromagus commented 2 weeks ago

@Piagno i do not use borders, I use monocle mode, where one master window on fullscreen (60inch, 4k). If i create another window on this layout and switch - this window take a fullscreen too. Somebody uses "smartborder" - if main window alone - enabled "noborder" mode...

Friptick commented 2 weeks ago

@Piagno The hacky "solution" of default_border pixel x|none does not entirely remove the bar. It is still visible to the cursor so that you risk changing tabs inadvertently, which is very confusing and annoying. Adding font pango:monospace 0 had a better effect but no longer works in the latest versions. This is all detailed above.

Thank you @emersion for your consideration of this issue.