I would like to set a keybind that moves all windows contained in the current workspace to another workspace. The following example is wrong, but that is what I want to achieve.
function allWindowsToWorkspace(destination)
local currentWorkspaceID = hl.get_active_workspace().id
local windowsInCurrentWorkspace = hl.get_workspace_windows(currentWorkspaceID)
for window, info in pairs(windowsInCurrentWorkspace) do
return hl.dsp.window.move({ workspace = destination, window = info.id })
end
end
for i = 1, 10 do
local i = i % 10
hl.bind( "SUPER + ALT + " .. i, allWindowsToWorkspace(i))
end
I remember having some keybinds for this in Sway:
bindsym $mod+shift+c [workspace=__focused__] kill
bindsym $mod+ctrl+alt+1 [workspace=__focused__] move to workspace number 1
bindsym $mod+ctrl+alt+2 [workspace=__focused__] move to workspace number 2
Just to be clear, I do not want to swap workspaces.
Any hints would be appreciated, thanks in advance.
