Skip to content

Z1proW/WinDrag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smooth Windows Drag Script

A highly responsive AutoHotkey window management script focused on smooth, low-latency dragging, snapping, and resizing using the Left Windows modifier key.


✨ Features

🖱 Window Dragging

  • Hold LWin + Left Mouse Button
  • Drag windows freely with buttery-smooth motion across screens
  • Automatically restores maximized windows before moving

🧲 Smart Snapping (on release)

Snapping triggers when you release the mouse:

  • ⬆ Top edge → Maximize
  • ⬇ Bottom edge → Minimize
  • ⬅ Left edge → Snap left half
  • ➡ Right edge → Snap right half

Supports multi-monitor setups.


❌ Quick Close

  • LWin + Middle Mouse Button
  • Closes the window under cursor
  • Safely ignores system UI (Start Menu, Search, taskbar)

📏 Native Resize Mode

  • LWin + Right Mouse Button
  • Uses Windows built-in resize system for smooth visuals
  • Fully compatible with Snap layouts, DPI scaling, and multi-monitor setups

Video Demo

winDrag-preview.mp4

⚙️ Configuration

You can tweak behavior by using the GUI Settings in the tray icon.


🚀 Usage

  • Hold LWin + drag → move window
  • Drag to screen edge → release → snap action
  • LWin + Right Click → resize
  • LWin + Middle Click → close window (or minimize)

▶️ Running the script (Windows only)

You have two options:

  • Precompiled version: Download and run winDrag.exe, no installation required. Download latest release

  • Script version: Download winDrag.ahk and run it with AutoHotkey v1.1+ Recommended for advanced users who want to edit the script.


🚀 Start on boot

To launch the script automatically at startup:

  1. Press Win + R

  2. Type:

    shell:startup
    
  3. Place a shortcut of winDrag.ahk or winDrag.exe in that folder

If you want the script to interact with applications running as Administrator, you might need to run the script with elevated privileges.