win-glide is a high-performance Windows utility designed for rapid, momentum-based window repositioning using keyboard arrow keys. It prioritizes tactile feedback, precision, and a "snappy yet light" physics model, allowing you to "glide" windows across your desktop with ease.
- Fluid Keyboard Movement: Move active windows using arrow keys with high-precision acceleration and friction, powered by a 120Hz physics loop.
- Instant Window Centering: Press
Win + Alt + Cto center the focused window on its current monitor in one step. - Tactile Window Resizing: Hold
Shift+ Arrow Keys to grow/expand borders outwards, orAlt+ Arrow Keys to shrink/pull borders inwards. Resizing uses continuous overlay preview physics and commits the physical window at the end of the gesture. - Snappy & Light Physics: Uses a Dual-Friction Model for slow, deliberate acceleration to high speeds while maintaining a nearly instant "glide stop" upon release.
- Free Multi-Monitor Movement: Glide windows seamlessly across your entire virtual desktop. Windows can be "parked" partially off-screen while maintaining a safe 150px visible margin.
- Safe & Responsive:
- Maximized Window Guard: Prevents accidental movement or resizing of maximized windows.
- Panic Exit: Any other keyboard input or mouse click immediately deactivates the glide session for instant control recovery.
Due to Windows User Interface Privilege Isolation (UIPI), standard-user applications are restricted from interacting with "high-integrity" windows.
- Task Manager / Elevated Apps: To move windows belonging to Administrative processes (like Task Manager), you must Run win-glide as Administrator.
- Automatic Detection: The application will warn you at startup if it's running with limited privileges and will skip activation on restricted windows with a clear console message.
- Launch: Run the application (
cargo runor the compiled binary). - Center (One-Shot): Press
Win + Alt + Cto center the focused window inside the monitor work area (taskbar-aware). - Activate glide: Press
Ctrl + Alt + F10while any window is focused to start a "glide" session. The tinted helper overlay will appear over the window. - Move: Use the Arrow Keys to apply thrust. Acceleration is continuous; hold the keys to reach top speed (~1.3s spin-up).
- Resize: Hold
Shift + Arrow Keysto expand borders outwards, orAlt + Arrow Keysto shrink borders inwards. The overlay updates continuously while the physical window is committed at the end of the resize. - Exit:
- Keys: Press
Escor any non-arrow/modifier key to let the window glide to a stop. - Mouse: Click anywhere to instantly deactivate the session.
- Timeout: The session automatically ends after 5 seconds of inactivity.
- Focus Loss: Switching windows or losing focus will also end the session.
- Keys: Press
Upon first run, win-glide generates a config.json next to the running executable. You can customize the physics, resize speed, and hotkeys:
{
"physics": {
"acceleration": 3000.0,
"friction": 10.0,
"thrust_friction": 0.5,
"top_speed": 4000.0
},
"resize_speed": 600.0,
"hotkey": {
"modifiers": 3,
"vk": 121
},
"center_hotkey": {
"modifiers": 9,
"vk": 67
}
}Note: Acceleration and top speed are in pixels per second. The resize_speed field controls the base speed of continuous resizing (Default: 600.0). You can optionally define a resize_physics block in config.json (similar to the translation physics block) for custom resizing momentum and friction; if omitted, resize physics values are computed proportionally based on resize_speed. Modifiers (Default: Ctrl+Alt) and Virtual Key (vk) codes follow Win32 standards.
This project targets Windows 10/11 on x86_64 and needs:
- A recent Rust toolchain with
cargo(installed via rustup.rs). - Microsoft Visual C++ Build Tools (MSVC) including the Windows 10/11 SDK.
cargo build --release
./target/release/win-glide.execargo testNote: Some tests that register global hooks or hotkeys are marked as #[ignore] to avoid failures in non-interactive CI environments. To run all tests locally, use cargo test -- --ignored.
- Graceful Shutdown: The application uses a thread-safe signaling mechanism. When
Appreceives aShutdownevent (fromCtrl+C), it sends aWM_QUITsignal to the background input thread. This ensures thatDropimplementations for low-level hooks and global hotkeys are executed reliably. - DPI Awareness: The application is
PerMonitorV2DPI-aware. Movement and rendering are normalized against the current monitor's DPI scaling. - Resize Rendering: Overlay resize previews are intentionally ghost-driven and are only redrawn when the rounded window bounds actually change, which reduces churn and keeps the UI responsive.
- Testing Hygiene: System-level tests involving Win32 hooks require an active interactive desktop session. These are gated behind
#[ignore]to maintain CI stability.
This project follows mandatory documentation habits. Detailed technical decisions and bug fixes are recorded in the .history/ directory.
This project is licensed under the MIT License.
