Created
May 1, 2015 06:19
-
-
Save imjma/51710df48cf6110e758f to your computer and use it in GitHub Desktop.
move mouse to centre of next monitor by hammerspoon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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