Skip to content

Conversation

@Nejrup
Copy link

@Nejrup Nejrup commented Oct 26, 2023

Allows you to ignore the macbook m1pro/m2pro notch on compatible apps. Default is on, so no breaking change.
ezgif-4-1360900ffc

#1934

Allows you to ignore the macbook m1pro/m2pro notch on compatible apps. Default is on, so no breaking change.
@asmvik
Copy link
Owner

asmvik commented Dec 30, 2023

I think this would work better as a rule property that can target specific apps/windows, instead of being a global configuration option that applies to everything.

@asmvik asmvik force-pushed the master branch 2 times, most recently from 3a0e1d8 to 656f8c8 Compare December 30, 2023 22:02
@asmvik
Copy link
Owner

asmvik commented Jan 3, 2024

Is this even necessary? Alacritty supports "SimpleFullscreen", which when activated fullscreens the window behind the notch. There is no reason to use yabai to move and resize the window at this point, so doing yabai -m rule --add app="^Alacritty$" manage=off is sufficient.

Does VS Code work differently?

@Nejrup
Copy link
Author

Nejrup commented Jan 10, 2024

Is this even necessary? Alacritty supports "SimpleFullscreen", which when activated fullscreens the window behind the notch. There is no reason to use yabai to move and resize the window at this point, so doing yabai -m rule --add app="^Alacritty$" manage=off is sufficient.

Does VS Code work differently?

The idea was to still have yabai managing windows (for example two vscode windows side by side), but be able to utilize the extra screen space. Now yabai places all windows under the notch regardless..
It was just a suggestion that I found useful, but it could easily be added as a rule or something else instead :)

@diocletiann
Copy link

diocletiann commented Jan 26, 2024

Is this even necessary? Alacritty supports "SimpleFullscreen", which when activated fullscreens the window behind the notch. There is no reason to use yabai to move and resize the window at this point, so doing yabai -m rule --add app="^Alacritty$" manage=off is sufficient.

Does VS Code work differently?

I must have missed the "SimpleFullscreen" ability. What's the yabai command to tell a window to go into "SimpleFullscreen" mode? Thanks!

@asmvik
Copy link
Owner

asmvik commented Jan 27, 2024

I must have missed the "SimpleFullscreen" ability. What's the yabai command to tell a window to go into "SimpleFullscreen" mode? Thanks!

Sorry for the confusion. The SimpleFullscreen option is an Alacritty feature. Alacritty then removes the title-bar and automatically fullscreens the window behind the notch. Thus, yabai no longer has to move and resize the window; alacritty already did that itself. So in yabai just add a rule with manage=off to ignore it.

The idea was to still have yabai managing windows (for example two vscode windows side by side), but be able to utilize the extra screen space. Now yabai places all windows under the notch regardless..
It was just a suggestion that I found useful, but it could easily be added as a rule or something else instead :)

So I kinda get where you're coming from, but I have some problems visualizing how this would play out in more complex layouts where there are windows from multiple applications where some can place windows below the notch and some cannot. I am also unsure if yabai is capable of moving said window behind the notch using the accessibility API, or if it is only that application itself that is able to place its own windows behind the notch.

I guess my general take on this request is that I am not against the idea of such a feature, but I am picky regarding how said feature is implemented and how it interacts with the rest of the yabai functionality.

For me that means I'm at the stage where I'd have to play around with multiple applications that provide this kind of support, observe some behaviour and try to think of how this could all work together.

@diocletiann
Copy link

diocletiann commented Jan 27, 2024

I must have missed the "SimpleFullscreen" ability. What's the yabai command to tell a window to go into "SimpleFullscreen" mode? Thanks!

Sorry for the confusion. The SimpleFullscreen option is an Alacritty feature. Alacritty then removes the title-bar and automatically fullscreens the window behind the notch. Thus, yabai no longer has to move and resize the window; alacritty already did that itself. So in yabai just add a rule with manage=off to ignore it.

No worries, I just got excited. I love SimpleFullscreen and if there's any sorcery you can do to have Yabai force it on windows/apps that don't include support I'm happy to donate.

@asmvik
Copy link
Owner

asmvik commented Jan 31, 2024

and if there's any sorcery you can do to have Yabai force it on windows/apps that don't include support

It can be done by injecting code into that specific application. I have so far opted for not doing this in yabai, but maybe it could be added as an opt-in kind of feature.

@AaronLieb
Copy link

I have some problems visualizing how this would play out in more complex layouts where there are windows from multiple applications where some can place windows below the notch and some cannot.

Maybe I'm unaware of some more complex scenarios, but here are the three 3 scenarios I could think of, and what I believe are sane recommendations for what the behavior should look like in those scenarios.

All windows touching top of screen support notch and are enabled
✅ Display all windows behind notch

All windows touching top of do not screen support notch or are not enabled
❌ Display none of the windows behind notch

Some windows touching top of screen support notch and are enabled
❌ Display none of the windows behind notch

Are there other scenarios outside of these 3?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants