I have a love-hate relationship with large monitors. On one hand, the wide canvas is amazing, having no bezels breaking the visual flow, and plenty of room to work. But the downside? Managing windows across that huge space quickly becomes a chore.

Yes, Windows does offer basic window management shortcuts. You can also install Microsoft PowerToys, which includes FancyZones for more advanced snapping. But even then, the flexibility is limited. If you want pixel-perfect control over where your windows land, you need something more customizable.

That’s where AutoHotKey comes in.

With a little scripting, AutoHotKey lets you define your own window snapping behavior, down to the exact coordinates, width, and height. You can assign hotkeys to instantly move windows into pre-defined zones, arranged exactly how you want them.

How I Use It

On my large monitor, I divide the screen into three vertical zones:

  • Left (1120px Width - Passive Zone)
  • Center (1600px Width - Active Zone)
  • Right (1120px Width - Passive Zone)

Each zone has a custom hotkey that snaps the current window into that area. For example, I use Win + F10 to move a window into the left zone.

Monitor Zones

⚠️ Note: Some Electron apps handle window size differently. They may require a few extra pixels to match widths exactly. For this, I keep a AppsWithBorders list to tweak individual apps when needed.

My AutoHotKey Script

#Requires AutoHotkey v2.0
#SingleInstance Force

#F10::WindowManager.Resize(0, 0, 1120, 1553)
#F11::WindowManager.Resize(1120, 0, 1600, 1553)
#F12::WindowManager.Resize(2720, 0, 1120, 1553)

class WindowManager 
{
	static BorderOffsets := {X: -6, W: 11, H: 6}
	
	; These applications need adjustment, use Uppercase
	static AppsWithBorders := Map(
		"FIREFOX.EXE", true,
		"POSTMAN.EXE", true,
		"CHROME.EXE", true,
		"DRAW.IO.EXE", true,
		"QTCREATOR.EXE", true
	)

	static Resize(targetX, targetY, targetW, targetH)
	{
		try {
			hwnd := WinExist("A") ; Get Active Window Handle
			if (!hwnd)
				return

			processName := WinGetProcessName(hwnd)
			
			; Check if process needs border adjustment
			if (this.AppsWithBorders.Has(StrUpper(processName))) {
				targetX += this.BorderOffsets.X
				targetW += this.BorderOffsets.W
				targetH += this.BorderOffsets.H
			}

			; Restore if maximized
			if (WinGetMinMax(hwnd) == 1) {
				WinRestore(hwnd)
			}

			WinMove(targetX, targetY, targetW, targetH, hwnd)
		}
	}
}

Note: This script is for AutoHotKey v2.x only. It will not run in the deprecated v1.1 version.

If you’re struggling to manage windows on a large monitor, this kind of setup makes a huge difference. Give it a try and customize it to match your exact workflow.

Happy snapping!