俺も似たような使い方してるけど、サイドバイサイドや左、中、右のスポットも追加してる。これにはHammerspoonだけ使ってるけど、これだけでも全然価値があるよ。ウィンドウのサイズや位置を数学で指定するんだ。狂ってるよね。
local mode = hs.screen.primaryScreen():currentMode()
local mods = {"ctrl", "alt", "cmd"} -- そのキーを押しまくる --
local w = 1094 -- GitHubやHNではクリップなし
local h = 1122 -- 高め
local x_1 = 0 -- 左端
local x_2 = math.max(0, (mode.w - w - w) / 2) -- 左中
local x_3 = (mode.w - w) / 2 -- 中央
local x_4 = math.min(mode.w - w, x_2 + w + 1) -- 右中
local x_5 = mode.w - w -- 右端
local y = 23 -- メニューバーの下の画面上部
hs.hotkey.bind(mods, "2", function() move_win(0, y, mode.w, mode.h) end) -- 最大化
hs.hotkey.bind(mods, "3", function() move_win(x_1, y, w, h) end)
hs.hotkey.bind(mods, "4", function() move_win(x_2, y, w, h) end)
hs.hotkey.bind(mods, "5", function() move_win(x_3, y, w, h) end)
hs.hotkey.bind(mods, "6", function() move_win(x_4, y, w, h) end)
hs.hotkey.bind(mods, "7", function() move_win(x_5, y, w, h) end)
end
function move_win(x, y, w, h)
hs.window.focusedWindow():setFrame(hs.geometry.rect(x, y, w, h))
end