From b7a75da2d3b8dd2bc65ec5825f0a9d95e4b0f2be Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:50:29 -0400 Subject: [PATCH] hammerspoon hotkey for maximize --- hammerspoon.symlink/Spoons/MoveWindow.spoon/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hammerspoon.symlink/Spoons/MoveWindow.spoon/init.lua b/hammerspoon.symlink/Spoons/MoveWindow.spoon/init.lua index dc6071c..a1b5dd6 100644 --- a/hammerspoon.symlink/Spoons/MoveWindow.spoon/init.lua +++ b/hammerspoon.symlink/Spoons/MoveWindow.spoon/init.lua @@ -19,6 +19,13 @@ function obj:init() -- and move the window to the next screen setting the same unitRect win:move(win:frame():toUnitRect(screen:frame()), screen:next(), true, 0) end) + + hs.hotkey.bind({ "alt", "ctrl", "cmd" }, "m", function() + -- get the focused window + local win = hs.window.focusedWindow() + -- maximize if possible + win:maximize() + end) end return obj