Move and resize windows. Inspired by Rectangle app.
mkdir -p ~/.hammerspoon/Spoons
git clone https://github.com/gnudad/Rectangle.spoon.git ~/.hammerspoon/Spoons/Rectangle.spoon
Add to ~/.hammerspoon/init.lua
local mods = { "ctrl", "cmd" }
hs.loadSpoon("Rectangle"):bindHotkeys({
left_half = { mods, "a" },
right_half = { mods, "d" },
center_half = { mods, "s" },
top_half = { mods, "w" },
bottom_half = { mods, "x" },
top_left = { mods, "q" },
top_right = { mods, "e" },
bottom_left = { mods, "z" },
bottom_right = { mods, "c" },
maximize = { mods, "f" },
almost_max = { mods, "g" },
smaller = { mods, "-" },
larger = { mods, "=" },
center = { mods, "0" },
focus_left = { mods, "h" },
focus_right = { mods, "l" },
focus_up = { mods, "k" },
focus_down = { mods, "j" },
})