mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 09:06:44 +00:00
Fix for moving Chrome and some other apps between spaces
This commit is contained in:
@@ -311,16 +311,20 @@ wm.resizeWindowOnGridSymmetrically = function (w, h)
|
||||
end
|
||||
|
||||
-- moveWindowToSpace
|
||||
-- Requires ctrl+<left>/<right> and ctrl+<num> system keybindings, borrowed from
|
||||
---
|
||||
-- Requires ctrl+<left>/<right> and ctrl+<num> system keybindings, originally
|
||||
-- from:
|
||||
-- https://github.com/Hammerspoon/hammerspoon/issues/235#issuecomment-101069303
|
||||
wm.moveWindowToSpace = function (direction)
|
||||
return function()
|
||||
local mouseOrigin = mouse.getAbsolutePosition()
|
||||
local win = hs.window.focusedWindow()
|
||||
local app = win:application()
|
||||
local clickPoint = win:zoomButtonRect()
|
||||
|
||||
-- click and hold next to the zoom button close to the top of the window
|
||||
clickPoint.x = clickPoint.x + clickPoint.w + 5
|
||||
clickPoint.y = clickPoint.y + (clickPoint.h / 2)
|
||||
clickPoint.y = win:frame().y + 7
|
||||
|
||||
local mouseClickEvent = hs.eventtap.event.newMouseEvent(
|
||||
hs.eventtap.event.types.leftMouseDown, clickPoint
|
||||
|
||||
Reference in New Issue
Block a user