Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys (which are Win + LEFT to snap an active window to the left half of a monitor and Win + RIGHT to snap a window to the right half of a monitor) by adding 9 additional snap methods.
- Install AutoHotKey
- Copy or Download the AdvancedWindowSnap.ahk file to your computer and double click it to run it.
- (Optional) To have the program run when you start up your computer, place the .ahk file into your computer's startup folder.
- The Windows 7 Startup Folder can be accessed by mousing to Start > All Programs, then right-clicking on Startup and selecting "Open".
- The Windows 8 Startup Folder can be accessed by tapping Win + R on your keyboard, then in the Open: field, type
shell:startup
then press Enter.
Hotkey | Behavior |
---|---|
Win + Alt + UP | Window will snap to the top half of the screen. |
Win + Alt + DOWN | Window will snap to the bottom half of the screen. |
Ctrl + Win + Alt + UP | Window will snap to the top third of the screen. |
Ctrl + Win + Alt + DOWN | Window will snap to the bottom third of the screen. |
These will work only if you have NumLock turned ON. These are ideal for Landscape Monitors.
Hotkey | Behavior |
---|---|
Win + Alt + Numpad 7 | Window will snap to the top-left quarter of the screen. |
Win + Alt + Numpad 8 | Window will snap to the top half of the screen. |
Win + Alt + Numpad 9 | Window will snap to the top-right quarter of the screen. |
Win + Alt + Numpad 1 | Window will snap to the bottom-left quarter of the screen. |
Win + Alt + Numpad 2 | Window will snap to the bottom half of the screen. |
Win + Alt + Numpad 3 | Window will snap to the bottom-right quarter of the screen. |
These will work only if you have NumLock turned ON. These are ideal for Portrait Monitors.
Hotkey | Behavior |
---|---|
Ctrl + Win + Alt + Numpad 8 | Window will snap to the top third of the screen. |
Ctrl + Win + Alt + Numpad 5 | Window will snap to the middle third of the screen. |
Ctrl + Win + Alt + Numpad 2 | Window will snap to the bottom third of the screen |
- v1.00, 08 Jan 2015
- Initial Version
If you plan on working with AutoHotKey files, consider using Sublime Text 3. Read my steps for setting up Sublime Text 3 to edit AutoHotKey files here: Working with AutoHotKey in Sublime Text.
It looks like we can use the WinGetPosEx function to determine the offsets that should be applied to the window in order to remove the gaps. Here's a fork that demonstrates this: https://gist.github.com/park-brian/f3f790e559e5145b99bf0f19c7928dd8