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

Custom splits #56

Open
cpiber opened this issue Oct 12, 2024 · 13 comments
Open

Custom splits #56

cpiber opened this issue Oct 12, 2024 · 13 comments

Comments

@cpiber
Copy link
Contributor

cpiber commented Oct 12, 2024

Currently column_default_width and window_default_height take a fixed set of strings. I think it could be nice to be able to specify custom percentages (keeping support for the existing options of course). I'm interested in working on it, but want to hear your opinion first.

@dawsers
Copy link
Owner

dawsers commented Oct 12, 2024

What would you use this for? I would like to understand the use case first. The reason why there are only a few preset values is they can mostly be combined to add up to the width or height of the screen, so the movements are cleaner (1/3+2/3 or 1/4+1/4+1/2 etc.). Allowing let's say 17% would make things a bit messier in terms of user experience, in my opinion. That is why I am interested in your use case, so I can understand the need for this.

@cpiber
Copy link
Contributor Author

cpiber commented Oct 13, 2024

PaperWM allows custom values, and I like 80% to 85% (small monitor). You currently only allow 75% or full width, so often I feel the window is either slightly too small or it takes the entire width, which isn't perfect either

@dawsers
Copy link
Owner

dawsers commented Oct 13, 2024

So you probably want to use the remaining 15-20% for a messaging up, file manager or similar. I understand.

I work with just 3-4 sizes,so cycling is faster. So the way I do it is I have a 2/3 window and a 1/6, hit Super+w + Down and the two windows become 80% and 20%, and fit the monitor exactly. Super+W is a submap for scroller:fitsize, and Down means all, but I can also use w instead of Down if I just want the visible ones (when there are more than those two). A similar submap is in the README.

(2/3) / (2/3 + 1/6) = 4/5 = 80%

fitsize is quite powerful, and often overlooked because PaperWM doesn't support it (at least when I was using it, a few months ago).

I find working on simple fractions easier because most times you want the monitor to fit full windows (an integer number of them), and fitsize helps with those cases when the few fractional widths I use aren't enough.

When all that isn't enough, there is Super+Shift+R which I map to resize (similar to the README), That is slower, but allows me to resize a window to the pixel.

If you think it would be useful to have more fractions, like ``ThreeQuarters` or even fifths I could add them, but my initial inclination is allowing any width would add complexity (there are also roundings going on internally) and confusion to non-power users. But I am open to discuss it.

@cpiber
Copy link
Contributor Author

cpiber commented Oct 13, 2024

I think you're using the extension quite differently from me.
My main use is just to scroll horizontally, I rarely use fitsize, since I actually want the windows to be larger than the screen. I just want to have several windows each at 80%, and then scroll left and right through them, similar to a group in regular Hyprland but nicer.

As mentioned, I would keep the existing words, and just allow the user to specify a number as well. I don't think that that will introduce additional problems, since you need to convert it to a float for screen space anyways (in update_height/update_width). But if you're against it, I'd appreciate a FourFifths ^^

@dawsers
Copy link
Owner

dawsers commented Oct 13, 2024

Got it. It is always good to know how people are using the plugin, especially because there are not too many users.That way, I try to accommodate requests, but still avoid getting into hairy business. In my opinion, custom splits introduce more parsing (which I don't like), and unbalanced combinations, for a simple use case like yours. So I will add more fractions, some fourths and fifths, which will also be useful for people with ultra-wide monitors, and your use case will hopefully be covered too (FourFifths will definitely be in).

In the future, if things get too complicated and there are more complex use cases, I may remove all the string fractions and change to numbers, so people can do whatever they want, but I think for now there is probably no need to go nuclear.

Thank you for your input. You have always been very helpful.

@dawsers
Copy link
Owner

dawsers commented Oct 13, 2024

I have added ThreeQuarters and FiveSixths in 915abf4. These two values will allow better handling of fourths and sixths window configurations, while allowing you to have an 83% width window (fivesixths). It is similar to what you said would be good for you (80-85%), and more useful in general for sixths configurations instead of adding another configuration of fifths. Now people can handle any width or height in multiples of 1/4 and 1/6.

I will leave this issue open to acknowledge the discussion about custom sizes, and maybe revisit or implement it in the future.

@cpiber
Copy link
Contributor Author

cpiber commented Oct 13, 2024

Perfect, thank you!

@maralorn
Copy link

Me personally (on my rather wide monitor) I like to cycle between onefourth threeeights and onehalf. This way every window is in multiples of 1/8. And increases are more linear than onefourth -> onethird -> onehalf. I have often "browser 3/8, editor 2/8, something else 3/8" that way the important thing is centered and the screen exactly filled.

Don’t know how crazy you wanna get on the options, but I’d volunteer to add either exactly treeeights, or treeeights and fiveeights or even all eights although 7/8 and 1/8 does not seem very sensible to me …

@dawsers
Copy link
Owner

dawsers commented Nov 22, 2024

OK, let me think about it. It is an easy change, but after that someone may still arrive with a theater screen and require sixteenths :-) I am kidding. I added sixths thinking that would solve most people's monitor problems (I have two 4K monitors and never use less than onethird), but everybody is different.

Oh, and I always end up mentioning fitsize, but nobody seems to be using it...

@maralorn
Copy link

Well, I love fitsize and use it a lot. I actually used hyprslidr until recently because it always auto fitsizes all columns in row mode.

I see how sixths seem reasonable. But one fourth on my 4k screen and my fontsize gives me exactly the line length limit we have at work in my editor which is very convenient. 😂

@cpiber
Copy link
Contributor Author

cpiber commented Nov 22, 2024

@dawsers Here is where #56 might be useful ;)

@dawsers
Copy link
Owner

dawsers commented Nov 22, 2024

OK...I'd rather add eighths than open that can of worms! :-)

I'm finishing something more general, but I will add it right after.

@dawsers
Copy link
Owner

dawsers commented Nov 23, 2024

eighths are in 983f609

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

No branches or pull requests

3 participants