-
Notifications
You must be signed in to change notification settings - Fork 14
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
shift modifier to select multiple zones #43
Comments
I think the modifier key would be more intuitive to use |
I think this feature would be an awesome addition. I started looking at the code, to see if I could contribute that. I'm writing my thought process here, in case @gerritdevriese want to give some feedback. From what I understand, the script is designed this way (in a nutshell):
So a way to make that work would be something like :
I'll give this a go and see how this ends up :) |
I am also in favor of modifier keys instead of hitboxes, but at that time I hadn't found a good way to handle key presses using the KWin API. Maybe it's possible now, but haven't looked in to it recently. @jbtrystram You can definitely try to tackle this if you want, your thought process looks alright. |
As a short-term alternative to do something similar, for anyone like me who might be looking, you can make overlapping zones. Only works consistently if you have the snapping set to only when over the icon.
|
@irasponsible , that's a brilliant idea! I've implemented it for myself and it's working quite well. @gerritdevriese , is this something you'd be interested in supporting? It is kind of a weird scenario and I'm not sure of the best way to handle it. An option to only render the target zone? It is a slight improvement at least for my layout, but I'm debating if it's worth the extra complexity in general. |
https://github.dev/SinanAkkoyun/kde-kzones/tree/clean-overlapping-zones For everyone that wants the quick hack that @fynzhak showed (I just changed 2 lines of code, there is no option to disable the change) |
{
"name": "Super Grid",
"padding": 26,
"zones": [
{
"x": 25,
"y": 0,
"height": 100,
"width": 50
},
{
"x": 25,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 50,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 0,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 75,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 0,
"y": 0,
"height": 50,
"width": 25
},
{
"x": 0,
"y": 50,
"height": 50,
"width": 25
},
{
"x": 75,
"y": 0,
"height": 50,
"width": 25
},
{
"x": 75,
"y": 50,
"height": 50,
"width": 25
}
]
}, |
Thanks for sharing that @SinanAkkoyun ! I finally had some time this morning to dig into it a little bit too. I have mine set up to disable the Zone Selector and render only the target zone. That gives me the effect in the screenshot above. The problem is that if you do have the Zone Selector enabled, it will still render all the overlapping zones and looks bad. I'm not sure what can be done about that. Maybe it's the price to pay for wanting the overlap? Also, in case anyone is interested, here's my layout: {
"name": "AllZones",
"padding": 0,
"zones": [
{
"x": 0,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 25,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 50,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 75,
"y": 0,
"height": 100,
"width": 25
},
{
"x": 25,
"y": 0,
"height": 100,
"width": 50
},
{
"x": 0,
"y": 0,
"height": 50,
"width": 25
},
{
"x": 25,
"y": 0,
"height": 50,
"width": 25
},
{
"x": 50,
"y": 0,
"height": 50,
"width": 25
},
{
"x": 75,
"y": 0,
"height": 50,
"width": 25
},
{
"x": 0,
"y": 50,
"height": 50,
"width": 25
},
{
"x": 25,
"y": 50,
"height": 50,
"width": 25
},
{
"x": 50,
"y": 50,
"height": 50,
"width": 25
},
{
"x": 75,
"y": 50,
"height": 50,
"width": 25
},
{
"x": 0,
"y": 0,
"height": 100,
"width":50
},
{
"x": 50,
"y": 0,
"height": 100,
"width":50
}
]
} |
That's awesome! Thank you for sharing :) |
Once we define zones, a window can only be dropped into a specific zone.
It would be nice if, while dragging a window around, you can press
shift
orctrl
or something to select multiple zones.For example, you drag to one zone, then press
shift
/ctrl
and drag to another zone and let go. Then the window would drop to a new "meta zone".I can give more examples if needed.
The text was updated successfully, but these errors were encountered: