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

Update always_center_master to work on non-centered master mode orientations #5312

Closed
derethil opened this issue Mar 28, 2024 · 8 comments · Fixed by #5339
Closed

Update always_center_master to work on non-centered master mode orientations #5312

derethil opened this issue Mar 28, 2024 · 8 comments · Fixed by #5339
Labels
enhancement New feature or request

Comments

@derethil
Copy link

derethil commented Mar 28, 2024

Description

The current implementation of always_center_master only works with orientation=center. It would be nice to have the same option for e.g. orientation=left, so the master window doesn't fill the entire screen when it is the only window in the workspace.

The option name would be rather misleading after implementing this feature, however, so maybe always_center_master can be removed in favor of keep_master_when_only or something.

Use Case

Personally, my ultrawide screen isn't wide enough for the 3-column centered orientation but it's too wide for windows to take the full screen width comfortably. I wrote a small script to handle this by floating and resizing windows but it would be nice to have it builtin so windows are still tiled.

@derethil derethil added the enhancement New feature or request label Mar 28, 2024
@thejch
Copy link
Contributor

thejch commented Mar 30, 2024

Possible with workspace selectors:
workspace = w[t1], gapsout:20 400 20 400

@derethil
Copy link
Author

derethil commented Mar 31, 2024

I completely missed that workspace selector in the docs, thanks - that solves my problem nicely. I'll leave the issue open for now since your PR is related to it.

@thejch
Copy link
Contributor

thejch commented Apr 1, 2024

I completely missed that workspace selector in the docs, thanks - that solves my problem nicely. I'll leave the issue open for now since your PR is related to it.

now you should be able to do
workspace = w[t1], layoutopt:orientation:center
to force center orientation when theres only 1 tiled window
better than the gaps solution IMO

also set master:always_center_master = true of cource

@derethil
Copy link
Author

derethil commented Apr 1, 2024

Adding this rule seems to introduce some weird behavior for me (I normally use the left orientation):

  • My default workspace is always left orientation. even with 1 tiled window.
  • Non-default workspaces are always center orientation, even with >1 tiled window.

After restarting Hyprland again, the above behavior seems to be gone so it might be some weird edge case. All workspaces are now behave as if I have orientation = center in my config.

Are there some other options I should check that might be interfering with this?

@thejch
Copy link
Contributor

thejch commented Apr 1, 2024

probably a bug then. may get fixed in the future but i guess use gaps for now

@thejch
Copy link
Contributor

thejch commented Apr 1, 2024

actually, you can try

workspace = w[t1], layoutopt:orientation:center
workspace = w[t2-99], layoutopt:orientation:left

i think this works

@derethil
Copy link
Author

derethil commented Apr 1, 2024

Yep, can confirm that adding that second rule fixes it, thanks. Still seems like a bug though

@thejch
Copy link
Contributor

thejch commented Apr 1, 2024

yea it's bug but i cba to fix it now, since you can always just override it like that depending on your need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants