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

hide_edge_borders doesn't hide the title bar #4132

Closed
alecmev opened this issue May 7, 2019 · 6 comments
Closed

hide_edge_borders doesn't hide the title bar #4132

alecmev opened this issue May 7, 2019 · 6 comments

Comments

@alecmev
Copy link

alecmev commented May 7, 2019

Neither of these four hide the title bar of a fresh lone window on a fresh workspace:

hide_edge_borders both
hide_edge_borders smart
hide_edge_borders --i3 both
hide_edge_borders --i3 smart

It's my understanding that they should, even though the docs don't mention it explicitly. For example, this issue says "titlebar is hidden" in the first step of "Current behavior", and this PR says "title bar is hidden" too. What am I doing wrong? Does this work for others? Is this maybe a master issue?

@RedSoxFan
Copy link
Member

hide_edge_borders does not hide the title bars, just the border.

The confusion with the linked PR and issue stems from the behavior for tabbed and stacked containers and the following border modes: none and pixel. The following has no effect for border normal, which is the default. The two border modes hide title bars (and borders for the former) for split layouts. However, the titlebars are retained for tabbed and stacked layouts. If hide_edge_borders --i3 both|smart is given, the title bars will be hidden when there is only one child of the tabbed/stacked container (which matches i3's behavior). If hide_edge_borders both|smart is given, the title bar is retained even when there is only one child.

Since you do not appear to set default_border in your config (or have any for_window [<criteria>] border none|pixel) in your config, the views will have the normal border, which is never hidden

@alecmev
Copy link
Author

alecmev commented May 7, 2019

Okay, thanks for the explanation, this makes sense.

To provide some context, I've been using default_border normal 0 for a long time, with a couple of for_window, and decided to see what it would feel like if all lone windows had no title bars. However, I'm now realizing that what I want is default_border none 🙂

@savchenko
Copy link

After experimenting with hide_edge_borders it seems like @alecmev's conclusion is correct.

So, having the title hidden when there is only one window and showing it otherwise is impossible?..

@RedSoxFan , sorry for poking the old thread, but it is the most relevant one and I didn't want to flood the bug-tracker.

@nnuel
Copy link

nnuel commented Jan 16, 2022

After experimenting with hide_edge_borders it seems like @alecmev's conclusion is correct.

So, having the title hidden when there is only one window and showing it otherwise is impossible?..

@RedSoxFan , sorry for poking the old thread, but it is the most relevant one and I didn't want to flood the bug-tracker.

I also came across this issue. Would it be possible to manually program the wanted behaviour with a check on how many childs are shown on the window?

@wjdp
Copy link

wjdp commented Feb 5, 2023

I'm coming from i3 gaps which had this. Is there any way in sway to hide the title of a window if it's the only window in a workspace?

A manual workaround I've found for now is setting bindsym $mod+b border toggle and pressing this key to manually toggle the borders of window.

@CyrilSLi
Copy link

Check out https://github.com/CyrilSLi/linux-scripts (specifically detect_onlywindow.py) for an (imperfect) script I wrote and am using to solve this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants