App for macOS
Dockfit
Menu bar app by BARNICOM. Keeps every window within the visible area of its display, below the menu bar and above the Dock.
Free, for macOS 14 or later.
DMG, 2.2 MB · notarized by Apple · updates arrive automatically through the app
Automatic
When an external display is connected or disconnected, the resolution changes or the Mac wakes from sleep, Dockfit moves all windows into the visible area. In these cases, macOS itself often leaves windows behind the Dock.
Manual
“Tidy up now” in the menu bar or the keyboard shortcut ⌃⌥⌘T, which you can change in the settings. Apps on the “Excluded Apps” list are left unchanged, and launching at login is optional.
Layouts per Display
Draw, move and resize areas directly on the screen, snapped to a grid. When you drag a window, a miniature of the display with all its areas appears at the bottom. Drop the window on one of them and it takes up exactly that area. Dockfit recognizes each display and remembers its own layouts.
Permission
To move the windows of other apps, Dockfit needs access under System Settings → Privacy & Security → Accessibility. This access is used solely to read and set the position and size of windows.
Help
Answers to common questions are on the Dockfit help page.