Skip to content

Instantly share code, notes, and snippets.

@imjma
Created May 1, 2015 06:19
Show Gist options
  • Save imjma/51710df48cf6110e758f to your computer and use it in GitHub Desktop.
Save imjma/51710df48cf6110e758f to your computer and use it in GitHub Desktop.
move mouse to centre of next monitor by hammerspoon
-- Move Mouse to center of next Monitor
hs.hotkey.bind(hyper, '`', function()
local screen = hs.mouse.getCurrentScreen()
local nextScreen = screen:next()
local rect = nextScreen:fullFrame()
local center = hs.geometry.rectMidPoint(rect)
-- hs.mouse.setRelativePosition(center, nextScreen)
hs.mouse.setAbsolutePosition(center)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment