zeroxoneafour / kwin-autotile

Autotile script for kwin
https://store.kde.org/p/2003956
MIT License
43 stars 1 forks source link

Heuristic for desktop space optimization #15

Open kupiqu opened 1 year ago

kupiqu commented 1 year ago

It would be great if kwin-autotile would maximize how windows cover the desktop space, meaning that if the number of windows is smaller than the number of tiles, present windows borrow that free space.

zeroxoneafour commented 1 year ago

If you mean that clients should fill all of the free space they can, it should do this unless configured otherwise (check the faq).

Tile layouts are not configured using the script, so if you want tiles laid out differently the main way to do this is through the Meta-T interface.

If you're talking about something else, can you provide an example?

kupiqu commented 1 year ago

If you mean that clients should fill all of the free space they can, it should do this unless configured otherwise (check the faq).

I meant this, thanks (but I didn't see anything to that matter in faq)

I checked it further and it mostly works, even though sometimes two windows occupy the full space at first, and tiling starts then, so you can get 1 full window plus other tiled windows.

Also two other related comments:

image

zeroxoneafour commented 1 year ago

This would be a bug then if the autotiling is not working. Can you provide a scenario/example where it didn't work for you? A journalctl log would be great here as well.

As for your two comments -

  1. The order can really only go two ways due to how tiles are inserted. If you dislike the order, try setting up the layout differently or toggling invert insertion and seeing if that makes it any better.
  2. The script as far as I know cannot save state after a restart of KWin, so there would be no way to know if windows from a previous session were tiled or not if KWin doesn't do this without the extension. I may be able to think of something, though (maybe a toggle?)
kupiqu commented 1 year ago

This would be a bug then if the autotiling is not working. Can you provide a scenario/example where it didn't work for you? A journalctl log would be great here as well.

For instance in an empty desktop, open a terminal, minimize, restore, and open a new terminal. Both of them occupy the full space, one on top of the other.

  1. I played with this but couldn't figure out how to change the order and invert insertion seems not to do anything.
  2. I appreciate. You may want to check how this is implemented in kwin-quarter-tiling
zeroxoneafour commented 1 year ago

Try the latest build from the github and see if it fixes your issue. Also in the latest github build is a new insertion method, you can see if you like it more than the breadth-first method. It is called bottoms up.

I also found a bug in the invert insertion code that ignored the new default, so this new release should fix that as well.

To install it, manually download the autotile.kwinscript from master and upgrade to it in the scripts.

zeroxoneafour commented 1 year ago

Typescript version should also fix this bug