peterfajdiga / karousel

Scrollable tiling Kwin script
GNU General Public License v3.0
286 stars 5 forks source link

[Feature Request] Resize columns to fit on screen automatically #60

Closed ZenurikSD closed 1 week ago

ZenurikSD commented 3 months ago

First of all, thank you so much for the script, it feels like the perfect way to have tiled windows.

It would be nice to have some way to resize the windows that appear on new columns to fit on the current view. Most of the time my columns are just slightly wider than half of the screen, so when a new one appears, they never fit together side by side by default, and a manual resize is needed.

I think having a toggleable setting to "make columns fit on screen" with a configurable amount of max columns would be ideal.

Or maybe making the "Equalize widths of visible columns" option more robust to detect windows that are not fully visible to count as well would be enough (although it might change its behavior too much).

https://github.com/user-attachments/assets/5e593218-a7ec-4100-8e1b-e8ff6c524f6a

peterfajdiga commented 3 weeks ago

One of the goals of Karousel is to leave the control of window widths entirely to the user. But I agree that sometimes when opening a new window, you want to keep all the existing ones on the screen as well.

I've added two keyboard shortcuts: columns-squeeze-left and columns-squeeze-right (coming in 0.10). Using columns-squeeze-left after opening a new window should result in what you're asking for.

ZenurikSD commented 2 weeks ago

I just tested it and it works really well for what I needed, thanks!

ZenurikSD commented 2 weeks ago

Also, sorry for asking too much of you, but if possible, can you consider adding the reverse effect to "expand" the column back to out of screen?

I ask because once the columns are squeezed in, you need two steps to undo the action: (1) resize the new column so it goes off screen and (2) equalize the widths of visible columns.

It's a minor inconvenience though, so I understand if you don't think it's worth doing

peterfajdiga commented 2 weeks ago

It's a good idea. You can try using the column-width-increase shortcut, but you can't know if it will push the left or the right column off the screen. I'll think about adding directional versions of this shortcut.

ZenurikSD commented 1 week ago

Thank you! I'm closing this since the main issue was resolved