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

Ignore notch M1Pro: added '-m config notch' (on/off) #1938

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.
@koekeishiya
Copy link
Owner

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.

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

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!

@koekeishiya
Copy link
Owner

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

@koekeishiya
Copy link
Owner

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.

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.

3 participants