Closed andreyorst closed 7 years ago
This is caused by the small programs and autosize settings. Small programs get automatically switched to the right pane and other programs automatically adjust to the size of the small programs – causing this silly interaction.
I'm going to fix this by disabling the automatic switch and automatically shrinking small programs in case they are too large. I'll play around the settings tonight and commit a fix by tomorrow!
Whoa, thanks a lot!
Only thing i could wish that this kwin script could become something like a "bspwm for plasma"
@andreyorst, since creating the script, I've tried multiple window managers and I've become a better programmer. I'd like to re-write most of the script in order to support multiple layouts and tiling algorithms but I'm extremely busy right now.
I'm still fixing bugs and implementing minor features whenever issues are filed, but unfortunately huge changes such as new layouts and tiling algorithms will have to wait until I have gotten all the important work out of the way.
I pushed a quick fix. It should stop "Small Programs" perceiving their size if they are too large. That being said, it was a quick fix as I had a super busy day. I'll try to adjust the "Small Programs" and "Autosize" code further as soon as I have the time.
still works not quite as I expected. I decided to switch off "small programs" for telegram, but still, other apps are not cutting telegram in half. But now the behavior is identical as when "small apps" is on. Terminal isn't sized properly.
Well, i'll use it as is by now, because i'm not often use more than 2 apps on one desktop, so it is not a big problem for me.
This is getting odd. I replicated the issue easily before the commit but now I can't seem to replicate it anymore. After the changes, Telegram is getting cut in half in situations like this. I might be too tired to notice something obvious 😴 I'll get some sleep and get back to it in the morning. I'll also make some time available tomorrow to fix this issue, I can't leave it like this. Thanks for your help with the issue!
I decided to switch off "small programs" for telegram, but still, other apps are not cutting telegram in half. But now the behavior is identical as when "small apps" is on.
This is extremely weird, did you restart the script after changing the configuration (can be done by unticking the box, hitting apply, ticking the box and hitting apply again or simply by running kwin --replace
)? Unfortunately, the script can't read configuration changes automatically.
OHHHH I figured it out. Pardon me, I've used ctrl+Y to change telegram's size, and it changes both width and height for a window, which is not obvious when you use only 2 apps per desktop. That is causing my "new" problem.
Ahh, yes. I've tried to keep the keybindings to minimum so there's only one shortcut for expanding a window and one shortcut for shrinking a window. Adding and dividing the keybindings for all four directions would be extremely easy though, if someone feels like it's needed.
yeah i defined my keybindings like so: super+h - change focus to left window super+j - change focus to bottom window super+k - change focus to top window super+l - change focus to right window
Ctrl+super+h - swap left window ...
and to change size i would love something like in KDE Plasma with Alt Alt+super+h - extend width to left etc
By the way, I enabled "small apps" for telegram, and set its size with mouse. But when i swap tg with chromium...
this happens
Thanks for the suggestion, I'll add the Alt + Super + H/J/K/L keybindings tomorrow or the day after. Can you post a screenshot of your configuration and I'll see if I can fix the Telegram/Chromium swap before I hit the bed. It's most likely a weird interaction with the "Autosize" option I've overlooked.
My god, that's absolutely awful! My bad 😳
It should be way better now and I can finally get some sleep. Small Programs are a major pain in the ass though – especially with the existence of the "Autosize" option. I'm fairly certain most tiling window managers simply force windows to the tiles with little to no regard of their actual sizes. If you have any ideas how resizing and moving these programs should work, I'm open to suggestions!
The problem is still there. Everithing as on a screencast.
About behavior: maybe you should fit small program in a full-size invisible tile. So if new program opened it slices invisible tile, and small app changes its size.
Curious. I changed multiple things seen in the screencast. (Autosize was occuring when you resized Telegram - it shouldn't anymore & resizing small programs shouldn't increase the width of their tiles unless they grow larger than the tile). Have you installed the script via the store or git?
As for small programs, I'm doing it exactly like that. Small programs are placed on an invisible tile and either centered on that tile or to the edge of the tile (depending on the "Center" setting). If "Autosize" is enabled, the invisible tiles are automatically shrunk to small program's width and/or height depending on the situation.
Anyways, I'll keep working on this today!
Okay. I spent the whole day with the script and this issue still exists. It is – kind of – intentional. Size of the "Small Programs" is fixed and the opposite non-"Small Program" will respect their (vertical) sizes and adjust itself according to them. You can either shrink the "Small Program" manually or remove it from the "Small Programs" category (until I figure out a better approach – I'll probably need to add some nasty if
-cases for situations where "Small Programs" can get adjusted).
Small clients are a pain in the ass (especially moving and resizing) but overall, the size behaviour should feel way more consistent now. Not necessarily better, but more consistent. Vast empty space around "Small Programs" happens because they occupy a regular tile. If you place a tiny "Small Program" on a huge tile, it'll have a ton of empty space. Empty space can be cut by resizing another client towards a "Small Program". Horizontally swapping a "Small Program" with a large tile causes this, as the tiles remain the same but the contents of the tiles change.
I'll keep working on this tomorrow. I'm sure I can find a sane, clean and consistent way to handle "Small Programs". Right now the biggest problems are the different handling of horizontal and vertical panes, resizing "Small Programs" (it would be amazing if I could display the empty tile, automatically move the cursor to the edge of the tile and allow the user to resize the tile – unfortunately this is not possible) and adjusting the empty space around "Small Programs". I appreciate all feedback here – coding the changes is not an issue, figuring out the most sensible approach is. I wasted the whole day trial-and-erroring different "Small Programs" and "Autosize" behaviour without finding a one that felt consistent and user-friendly.
If not using "Small Programs" – everything should work consistently as expected.
With all due respect, I don't like the new implementation, neither I think it is consistent. I use several Small clients, most of the times they share a same desktop and screen. Before, I couldn't make a small client to step on other small clients, which is now possible. I think that it is incongruent as Small clients are supposed to have a fixed size, or at least to not obey automatic tiling in terms of size.
In fact, this was for me a nice property that I used when I found a sort of a bug, when opening/closing some apps, improperly changed the size of small clients adjusting it to other small clients (this was not very frequent and I could not find a way to reproduce it, so that's why I haven't filled an issue about this yet). However, this new behavior of the script makes it impossible to readjust the size of the small clients, because of what I said before, they step on each other, so increasing the size of one, automatically reduces the sizes of others.
In the approach that I would like best, small clients should never be resized in the context of the script unless their size is manually increased so they start stepping on quarters that are actively used by other windows. In this case, its size should be constrained to fit only the free space (free quarters).
Then perfection for me (see issue #10) would be if small clients (of small enough size that fit together in a same quarter), would in fact share a same quarter, but only when one, or more, other windows are present (so these windows benefit of an extra free quarter).
I am not suggesting to put them in the same quarter by default because in absence of other windows, they may look bad (too close one from the other in the context of an, otherwise, empty desktop).
Also, resetting the script now doesn't restore the size of small clients, which was the case before. I'm using this feature quite a lot. Could we get it back?
I am thinking now that perhaps distinct users utilize small clients seeking different goals, which may not be mutually compatible.
Wondering whether it would make sense to distinguish a couple of potential use cases and then decide whether to separate the small client category into easier to manage policies?
@kupiqu, thanks for the feedback, You can get back all of the features you enjoy, don't worry about it. I'll work with the script today and tomorrow, reverting and improving some of the features.
Unfortunately clients occupying the same tile will have to wait two or three weeks. It's quite a job and the next two weeks are extremely busy. I'll promise to implement it after ;)
@andreyorst, I've fixed this. In cases like this, Telegram gets shrunk to a quarter. I'm probably leaving the current behaviour as default and adding an option for the old behaviour with fixed-size "Small Programs".
@kupiqu, I'll close this as the issue is fixed. Let's move further discussion back to #10. Unfortunately I've been too busy with my bachelor's and haven't done anything since I said I'd revert some of the changes five days ago. The old features are still available through the releases-page though. I'll try to find some time tomorrow or the day after for the issue!
Sounds great, thank you!
Hello, thanks for great plugin.
Really strange behavior of opening a new window. For example if I open 2, and make one wider, new terminal will split one of those in half: step 1: step 2: Thats ok. But if i do the same with telegram an chromium any new window shat should split chomium in half would shirnk chromium and use 1/3 of screen like so: step 1: step 2:
Or if chromium on the left it causes different behavior: step 1: step 2:
I think it is related to small app setting. Because if telegram is not open it works normally