maurges / dynamic_workspaces

A kwin script that creates and deletes desktops as you move windows on the last one
BSD 3-Clause "New" or "Revised" License
76 stars 9 forks source link

Can it remove the 1st workspace if the window is closed? #17

Open laichiaheng opened 1 month ago

laichiaheng commented 1 month ago

It doesn't close it automatically, so there is always an empty workspace in front of other workspaces.

maurges commented 1 month ago

If you remove this empty workspace in front of others, you can't move new windows there, which means you can never create new desktops with this extension. In KDE, unlike old gnome that I used, you can't move windows to a workspace that doesn't exist.

In fact you can try it without support of this extension: you can delete the last desktop by right-clicking on the pager and selecting "delete desktop". Now try to move the window on the last workspace to a workspace to the right of it. Can you do it? What happens when you do?

I can imagine creating new shortcuts specifically for "move window to a new desktop" but I think it's more trouble than it's worth.

laichiaheng commented 1 month ago

If you remove this empty workspace in front of others, you can't move new windows there, which means you can never create new desktops with this extension. In KDE, unlike old gnome that I used, you can't move windows to a workspace that doesn't exist.

In fact you can try it without support of this extension: you can delete the last desktop by right-clicking on the pager and selecting "delete desktop". Now try to move the window on the last workspace to a workspace to the right of it. Can you do it? What happens when you do?

I can imagine creating new shortcuts specifically for "move window to a new desktop" but I think it's more trouble than it's worth.

I don't mean the last empty workspace, but the first workspace after I close the window, just like Gnome.

maurges commented 1 month ago

Do you mean the situation where you close the last window on a desktop, and move your view one desktop to the right, and this empty desktop still exists on the left? I remember I tried to do it, but this broke the desktop switching animation. (Which is now also broken with the rewrite for plasma 6, sighhh). This would be nice to have, but I don't feel strongly about it to implement it myself now. I'll gladly accept patches!

laichiaheng commented 1 month ago

Do you mean the situation where you close the last window on a desktop, and move your view one desktop to the right, and this empty desktop still exists on the left? I remember I tried to do it, but this broke the desktop switching animation. (Which is now also broken with the rewrite for plasma 6, sighhh). This would be nice to have, but I don't feel strongly about it to implement it myself now. I'll gladly accept patches!

Yes, it is what I mean. Unfortunately I don't know how to write codes.