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

improve ratio calculation #4601

Closed

Conversation

alexander-n8hgeg5e
Copy link

I added a RatioTile(ratio=1) object in my config and noticed that the
layout favored 3 upright elongated windows on a screen that is 1.125 higher than wide.
So they are really really slim, 1.125 tall and 0.333 wide.
The ratio is 1.125/(1/3)=3.375
But I expected them to be 3 wide "landscape" windows because that would be
1.125/3 tall and 1 wide, which is a better ratio because if you see the ratio
as longer_edge_of_window/shorter_edge_of_window then it is
1/(1.125/3)= 2.666
I think if this patch is applied it is needed to also change the default GOLDEN_RATIO value in the code. The golden_ratio value made windows wider and for me they were to high, so maybe it compensated
for this and I wouldn't have noticed it if I hadn't changed the default ratio.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Qtile!
If you have not heard from us in a while, please feel free to ping one of the devs or anyone who has commented on the PR, as sometimes things fall through the cracks.
You can also join the chat room for real-time discussion, see the community links.
For details on what PRs might need to include before we will merge them please see the docs.

@tych0
Copy link
Member

tych0 commented Dec 1, 2023

Can you send some screenshots? and,

I think if this patch is applied it is needed to also change the default GOLDEN_RATIO value in the code.

can you suggest a better value here? I guess the golden ratio was mostly chosen as a novelty: https://en.wikipedia.org/wiki/Golden_ratio

@alexander-n8hgeg5e
Copy link
Author

alexander-n8hgeg5e commented Dec 15, 2023

I noticed my patch does not work for the general use case. So I close this.
BTW, now I see it doesn't even depend on "self.ratio" anymore.
I need to say sorry for this, and thanks for the answer!

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.

None yet

2 participants