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

Request: Center windows when they won't stretch #924

Closed
Peeja opened this issue Jun 10, 2021 · 3 comments
Closed

Request: Center windows when they won't stretch #924

Peeja opened this issue Jun 10, 2021 · 3 comments
Labels
duplicate This issue or pull request already exists suggestion Request for new feature or some form of enhancement

Comments

@Peeja
Copy link

Peeja commented Jun 10, 2021

Sometimes windows refuse to stretch to the dimensions yabai wants them to take. For instance, I just tried installing and running the Beaker Browser for the first time, and like many apps on first launch, it has a size-constrained welcome window, here showing me the license information:

screenshot

Because it's the sole window, it notionally has the full screen by yabai's reckoning. But it refuses to be that big, so it's left up in the corner there, which is fine, but not very nice looking.

Instead, if it centered within the space yabai carved out for it, it would look much more natural, and probably even be positioned right where the app developer intended. It would also look great with other windows around: imagine it being in the center of its given space when the screen is split in half like this:

screenshot-2

I'm guessing this would be a bit of work to implement—it might mean having to do a second pass over the windows or something?—but I think it could be a big improvement.

@soundneedle
Copy link

Found this that would make it float. Maybe there’s a way to also force it to center.

yabai -m signal --add event=window_created action='yabai -m query --windows --window $YABAI_WINDOW_ID | jq -er ".resizable == 0 and .floating == 0" && yabai -m window $YABAI_WINDOW_ID --toggle float'

@koekeishiya
Copy link
Owner

I agree the current behaviour is not particularly good.

@koekeishiya
Copy link
Owner

Closing in favour of #235. Not really any breakthrough yet though.

@koekeishiya koekeishiya added the duplicate This issue or pull request already exists label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists suggestion Request for new feature or some form of enhancement
Projects
None yet
Development

No branches or pull requests

3 participants