Keyboard Shortcut to manipulate window position
How to navigate macOS application windows like a boss

Cmd Tab : switch to the next app (icon to the right)

Cmd Tab, followed by Cmd `~ : switch to the previous app (icon to the left)

Cmd `~ : cycle through all open windows of the app in focus. (Minimized windows are skipped.)

Below is an animation demonstrating what it looks like when windows are cycled.



This is a much faster way to navigate than Mission Control. And if you use Cmd H to Hide applications you're not using, you can keep your workspace free of clutter. Hidden apps are revealed again when tabbed to.

This answer assumes the use of an English keyboard, where the back-tick key's shifted character is the tilde. On non-English keyboard layouts, the back-tick key may have a different shifted character.

Precision control

For those looking for a solution similar to Magnet, but free, you can customize the AppleScript below, place it inside of an Automator Service, and trigger it with a keyboard shortcut.

tell application "System Events"
    set activeApp to name of first application process whose frontmost is true
end tell


set theApp to activeApp
(* These dimensions are for a 27-inch iMac. Customize as necessary. *)
set appWidth to 1280
set appHeight to 1440

tell application "Finder"
    set screenResolution to bounds of window of desktop
end tell

set screenWidth to item 3 of screenResolution
set screenHeight to item 4 of screenResolution

tell application theApp
    activate
    reopen
    set xAxis to (screenWidth - appWidth) / 2 as integer
    (*
    FOR LEFT PLACEMENT:   set xAxis to 0
    FOR CENTER PLACEMENT: set xAxis to (screenWidth - appWidth) / 2 as integer
    FOR RIGHT PLACEMENT:  set xAxis to (screenWidth - appWidth) as integer
    *)
    set yAxis to (screenHeight - appHeight) / 2 as integer
    set the bounds of the first window to {xAxis, yAxis, appWidth + xAxis, appHeight + yAxis}
end tell


Code originally written by Amit Agarwal and Tetsujin. Combined and modified by me.


How to create a simple keyboard macro with Automator?


After triggering the Service, you may see the message: "AppName.app" wants access to control "SystemEvents.app". Allowing control will provide access to documents and data in "SystemEvents.app", and to perform actions within that app. You must click "OK" to use the Service.