Skip to content

Instantly share code, notes, and snippets.

@z3t0
Created January 27, 2017 02:53
Show Gist options
  • Select an option

  • Save z3t0/cfdeb78130fcdca721aff3da7c3945f8 to your computer and use it in GitHub Desktop.

Select an option

Save z3t0/cfdeb78130fcdca721aff3da7c3945f8 to your computer and use it in GitHub Desktop.
function change_to_space(space)
-- already on space
if space == spaces.activeSpace() then
return
end
local new_space = get_spaces()[space]
print("changed")
if new_space ~= nil then
spaces.changeToSpace(new_space)
else
error("space does not exist: " .. tostring(space))
end
end
function func_change_to_space(index)
print("index" .. index)
return function(index)
return change_to_space(index)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment