Add movewindoworgroup alternative to Lua API
#14530
|
Currently, the I also tried to achieve this via Lua scripting, conditionally calling the correct dispatcher to move into/out of a window or move a window, but the current Lua API is not enough to do so. While it's possible to get the group of the current window and all of the groups in the current workspace, there is no way of knowing if a group is at the left/right of another group/window (to decide which dispatcher needs to be called). |
Replies: 4 comments 2 replies
|
Yes, please! That's all I used for window-moving binds previously. Tried to overload the tables with various permutations such as: hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "l" }, { into_group = "l" }, { out_of_group = true }))
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "r" }, { into_group = "r" }, { out_of_group = true }))
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "u" }, { into_group = "u" }, { out_of_group = true }))
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "d" }, { into_group = "d" }, { out_of_group = true }))-or- hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "l", into_group = "l", out_of_group = "l" }))
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "r", into_group = "r", out_of_group = "r" }))
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "u", into_group = "u", out_of_group = "u" }))
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "d", into_group = "d", out_of_group = "d" }))...to no avail. Of course no config errors when applying either, and the directional moves still work, so extra frustrating As other have mentioned in other issues, many invalid dispatcher commands simple return "Ok" instead of throwing an error. |
|
Missing this functionality here as well. Why was it removed? This is a regression. |
Good question. Regardless, this "Feature request" has 5 upvotes. Unabashed ping @vaxerski ;) |
probably as an accident. There were so many flags. |
it's still there, I just
forgor to document
it's
hl.dsp.window.move({ direction = "left", group_aware = true })