Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Drag windows in tiling mode #6

Open
wesbluemarine opened this issue Jul 28, 2023 · 5 comments
Open

Feature Request - Drag windows in tiling mode #6

wesbluemarine opened this issue Jul 28, 2023 · 5 comments

Comments

@wesbluemarine
Copy link

Could it be possible to implement dragging windows in tiling mode without putting them in floating?

@peterfajdiga
Copy link
Owner

This is doable and it would help improve ease of use. Thanks for letting me know you'd find it useful, as I wasn't really prioritizing this. Still it might take some time before I find the time for this as it's not entirely effortless.

@gleyconJ
Copy link

I support! Eagerly awaiting this feature.

@kelvie
Copy link

kelvie commented Jul 2, 2024

@peterfajdiga any clues for how to do this for those of us that are willing to try to implement this ourselves? Or what mechanisms in the kwin scripting API would allow for this?

This is probably the last piece of the puzzle for me to completely switch my desktop from hyprland back to KDE.

@peterfajdiga
Copy link
Owner

peterfajdiga commented Jul 7, 2024

@kelvie I suppose you'd have to use the interactiveMoveResizeStepped or frameGeometryChanged signal and the move boolean KwinClient property to detect windows being moved.

Then you'd have to figure out the user's intention based on the window's new position (frameGeometry KwinClient property) and adjust the layout accordingly using methods like Window.moveToColumn, Column.moveWindow (doesn't exist yet) or Grid.moveColumn (for single-window columns).

World.do applies the new layout, but you'll have to make sure that you don't try to move the window that the user is currently moving by setting Window.skipArrange (same as is done for resizing).

It would require quite a bit of effort and I'm wondering if that effort would be better spent by creating a separate GUI for rearranging windows - imagine a minimap of all the windows that can be dragged to desired positions. This way the user is not limited by what is currently visible on the screen and it also requires smaller mouse movements. This could be a popup or a plasmoid (like a taskbar - I've already created something like this, but I haven't yet found a method of communication between a plasmoid and a Kwin script). I think QML already has support for dragging items around (like in the Taskbar plasmoid), so in a way this might actually be easier... if we ignore having to create a GUI. Just a thought...

@gleyconJ
Copy link

@kelvie Suponho que você teria que usar o interactiveMoveResizeStepped ou frameGeometryChanged sinal e o move propriedade Boolean KwinClient para detectar janelas sendo movidas.

Então você teria que descobrir a intenção do usuário com base na nova posição da janela (frameGeometry Propriedade KwinClient) e ajuste o layout de acordo usando métodos como Window.moveToColumn, Column.moveWindow (ainda não existe) ou Grid.moveColumn (para colunas de janela única).

World.do aplica o novo layout, mas você terá que se certificar de que não tentará mover a janela que o usuário está movendo atualmente configurando Window.skipArrange (o mesmo que é feito para o redimensionamento).

Seria necessário bastante esforço e estou me perguntando se esse esforço seria melhor gasto criando uma GUI separada para reorganizar janelas - imagine um minimapa de todas as janelas que podem ser arrastadas para as posições desejadas. Desta forma, o usuário não está limitado pelo que está atualmente visível na tela e também requer movimentos menores do mouse. Isso pode ser um pop-up ou um plasmóide (como uma barra de tarefas - EU já criei algo assim, mas ainda não encontrei um método de comunicação entre um plasmóide e um script Kwin). Acho que o QML já tem suporte para arrastar itens (como no plasmóide da barra de tarefas), então, de certa forma, isso pode ser mais fácil... se ignorarmos a necessidade de criar uma GUI. Apenas um pensamento...

No words for this idea (I thought it was incredible!). I vote YES! Looking forward to this feature.

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

No branches or pull requests

4 participants