Hammerspoon
hammerspoon.orgAutomate macOS with Lua scripts
Every window arrangement on a key, with rebuilds when displays change.
Hammerdeck is a free, open-source Mac app for arranging windows across one or more displays using keyboard shortcuts instead of dragging. It lets you throw a window to another display and back with a single key, name two cells of a grid so a window spans them, and swap the windows on two displays. The site notes that macOS has no built-in shortcut for moving a window to another display or swapping displays, which Hammerdeck provides. When you unplug a monitor, windows gather on the laptop screen, and when you plug it back in, the layout rebuilds itself.
Beyond manual shortcuts, Hammerdeck includes a rules engine that watches your Mac: connecting a monitor can automatically arrange your windows, configured with a switch and a trigger picker rather than scripting. Its features include a Window Deck that tiles a screen's windows and enlarges the focused one, a Window Fan that keeps every window reachable from a screen edge, a Window Mode for keyboard-driven moves and resizes, and one-key undo for window moves. Each feature is a card you can toggle, with its bound shortcut shown on the badge.
Hammerdeck is transparent about what it does: it can flash a confirmation when a shortcut fires and show a notification when an automated action runs. Logs are plain local files that stay on your Mac, with no cloud, account, or subscription required. The app is native Swift with an embedded Lua engine, and the site says users never need to write Lua. Version 0.3.1 is available as a disk image or through Homebrew.
Automate Mac tasks with macros, on command or on a schedule
Easily add gestures to macOS with trackpad and Magic Mouse support
Manage your macOS windows like a pro, with just your mouse.
Quit apps automatically when their last window closes
Name macOS Spaces and snap windows into saved layouts
Customize Mac settings
Control browsers with macOS Shortcuts
⌥ Space: the command wheel for Mac. Hold, flick, done.