From 195b2b460161ad82f89e993e5aadbfd81db47fc0 Mon Sep 17 00:00:00 2001 From: Eason0210 Date: Thu, 19 May 2022 17:46:54 +0800 Subject: [PATCH] Update syntax to adapt latest hammerspoon --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index b1ce202..68d7ed1 100644 --- a/init.lua +++ b/init.lua @@ -28,7 +28,7 @@ function tiling.goToLayout(name) end function tiling.toggleFloat(floatfn) - local win = window:focusedWindow() + local win = window.focusedWindow() local id = win:id() excluded[id] = not excluded[id] @@ -60,7 +60,7 @@ end function tiling.cycle(direction) local space = getSpace() local windows = space.windows - local win = window:focusedWindow() or windows[1] + local win = window.focusedWindow() or windows[1] local direction = direction or 1 local currentIndex = fnutils.indexOf(windows, win) local layout = space.layout @@ -86,7 +86,7 @@ end function tiling.promote() local space = getSpace() local windows = space.windows - local win = window:focusedWindow() or windows[1] + local win = window.focusedWindow() or windows[1] local i = fnutils.indexOf(windows, win) if not i then return end