From 334780b2f492579c662b05ada2c217de97224c1e Mon Sep 17 00:00:00 2001 From: arnie Date: Wed, 28 May 2025 11:12:33 +0200 Subject: [PATCH] QoL window move --- home-manager/hammerspoon/window-move.lua | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/home-manager/hammerspoon/window-move.lua b/home-manager/hammerspoon/window-move.lua index a0a484e..e99c402 100644 --- a/home-manager/hammerspoon/window-move.lua +++ b/home-manager/hammerspoon/window-move.lua @@ -74,6 +74,53 @@ windowMove = function() fullscreen(win) end) end) + + + + hs.hotkey.bind({ "ctrl", "alt", "cmd", "shift" }, "pad1", function() + -- DELL S2722DGM + local scr = getScreenById("0F6BDB5B-840D-40BE-AAC9-B467A78E057A") + if scr == nil then + return + end + + for _, win in ipairs(window.focusedWindow():application():allWindows()) do + win:moveToScreen(scr) + timer.doAfter(1, function() + fullscreen(win) + end) + end + end) + + hs.hotkey.bind({ "ctrl", "alt", "cmd", "shift" }, "pad2", function() + -- DELL S2721DGF + local scr = getScreenById("D3142823-261D-46EF-B9C2-5181C7FE2CA5") + if scr == nil then + return + end + + for _, win in ipairs(window.focusedWindow():application():allWindows()) do + win:moveToScreen(scr) + timer.doAfter(1, function() + fullscreen(win) + end) + end + end) + + hs.hotkey.bind({ "ctrl", "alt", "cmd", "shift" }, "pad3", function() + -- AV Receiver + local scr = getScreenById("B5A65BB6-E73E-4C3D-977C-33C86798AA5A") + if scr == nil then + return + end + + for _, win in ipairs(window.focusedWindow():application():allWindows()) do + win:moveToScreen(scr) + timer.doAfter(1, function() + fullscreen(win) + end) + end + end) end windowMove()