gerritdevriese / kzones

KDE KWin Script for snapping windows into zones
https://store.kde.org/p/1909220
GNU General Public License v3.0
286 stars 16 forks source link

Feature request: Keybind for Directional Zone Movement #81

Closed Gregregorovich closed 1 month ago

Gregregorovich commented 3 months ago

I have multiple overlapping zones (to start with: 33%, 34%, 33% horizontally, in addition to 33% + 67% and 67% + 33%, and then also 100% and two 50% heights for each horizontal zone), and currently, to move a window froem 33%x100% left to 33%x100% right via the keyboard, I have to cycle through the for-this-operation irrelevent 50% heights.

PowerToys' Fancy Zones can use Meta+Arrow Keys to move windows around like this, and I'd like to be able to do the same.

I would suggest making the middle of the zone the point at which direction is determined from, should those be the same to then determine if there is a height difference (at which point up increases the height of the window, and down decreases), and then should there be e.g.: a 34% wide window and 50% wide window overlapping in the center, then if pressing left, the next zone to select would be the one with the further-left x value. This would mean that going from right to left would mean it would resize from 50% to 33% to 50%, but I think this would be better than the less intuitive (to me) of just using the furthest left value and leaving it at that, as then moving from left to right would be different from right to left.

gerritdevriese commented 2 months ago

This has been added into the main branch, are you able to build the script and test before release?

smairo commented 1 month ago

This has been added into the main branch, are you able to build the script and test before release?

Built from main a minute ago, its working correctly for me, tho I think there should still be "Move active window up". I can make windows go down, but only way to get up, is to go left or right to reset as there is no way I can find, to navigate up..

Edit: its working, there were no default binds and the shortcut was alphabetically way lower... :+1:

gerritdevriese commented 1 month ago

Thanks for testing, v0.8 has been released. The shortcut order is indeed a bit confusing 😆