Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Heuristic for desktop space optimization #15

Open
kupiqu opened this issue Mar 28, 2023 · 6 comments
Open

Heuristic for desktop space optimization #15

kupiqu opened this issue Mar 28, 2023 · 6 comments

Comments

@kupiqu
Copy link

kupiqu commented Mar 28, 2023

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
Copy link
Owner

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
Copy link
Author

kupiqu commented Mar 28, 2023

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:

  • the order seems a bit weird [3,4,2,1] (invert insertion is checked in my settings), isn't it? I would expect [1,2,3,4]:

image

  • It would be great if after restarting kwin, non-tiled windows present in the desktop become tiled, moving exceeding windows to other screens and virtual desktops, if available.

@zeroxoneafour
Copy link
Owner

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
Copy link
Author

kupiqu commented Apr 2, 2023

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
Copy link
Owner

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
Copy link
Owner

Typescript version should also fix this bug

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants