Skip to content

Alt+Drag Window Manager for Windows - Move any window by holding Alt + left-click drag (like Linux/KDE)

License

Notifications You must be signed in to change notification settings

TakashiKyoto/NinjaMove

Repository files navigation

NinjaMove - Alt+Drag Window Manager for Windows

A lightweight window manager for Windows that provides:

  • Alt+Drag - Move any window by holding Alt + left-click drag (like Linux/KDE)
  • Minimize Hotkey - Global hotkey to minimize the active window (default: Ctrl+Shift+Space)

Requirements

  • Windows 10/11
  • Python 3.9+
  • PySide6 6.9.0
  • pywin32

Compatibility

  • PySide6 6.9.0 - Tested and working
  • PySide6 6.10.x - Not tested, may work but not guaranteed

Installation

Option 1: Pre-built Executable (Recommended)

Download ninjamove.exe from the dist/ folder - no Python required.

Option 2: Run from Source

pip install -r requirements.txt

Usage

# Normal start
python ninjamove.py

# With debug logging enabled
python ninjamove.py --debug

# Run without console window (background)
pythonw ninjamove.py
# or use: run_silent.bat

Features

Alt+Drag Window Movement

Hold the Alt key (or custom modifier) and left-click drag any window to move it. Configurable modifiers: Ctrl, Shift, Alt.

Minimize Hotkey

Default: Ctrl+Shift+Space - Minimizes the active window. Fully customizable.

System Tray

  • App runs in system tray
  • Left-click tray icon to open settings
  • Right-click for quick menu (enable/disable features, exit)

Debug Logging

Two-level debug system:

  1. Debug Mode - Logs hotkey triggers, window moves, settings changes
  2. Alt+Drag Verbose - Logs every poll cycle (for debugging Alt+drag issues)

Configuration

Settings are stored in config.json:

{
  "minimize_hotkey": {"modifiers": ["ctrl", "shift"], "key": "space"},
  "drag_modifiers": ["alt"],
  "enable_minimize_hotkey": true,
  "enable_alt_drag": true,
  "auto_start": false,
  "start_minimized": true,
  "debug_mode": false,
  "debug_altdrag_verbose": false,
  "window_x": 100,
  "window_y": 100,
  "window_width": 400,
  "window_height": 480
}

Window position and size are remembered between sessions.

Admin Privileges

This app does NOT require admin to run. However:

  • Normal windows: Full control (move, resize, minimize, etc.)
  • Admin/elevated windows: Cannot be moved or controlled

If you need to move admin windows, run NinjaMove as administrator using Run as admin button in the NinjaMove interface.

Project Structure

ninjamove/
    ninjamove.py         # Entry point
    app.py               # Qt application, system tray
    config/
        settings.py      # JSON settings manager
        autostart.py     # Windows startup registry
    core/
        win32_utils.py   # Win32 API wrappers
        window_mover.py  # Alt+drag thread
        hotkey_manager.py# Global hotkeys
    gui/
        styles.py        # Dark theme
        main_window.py   # Settings UI
    debug/
        logger.py        # Two-level logging

Troubleshooting

Alt+Drag not working?

  1. Enable debug mode in settings
  2. Enable "Alt+Drag verbose logging"
  3. Check ninjamove_debug.log for details
  4. Common causes:
    • Another app intercepting Alt key (Game Bar, etc.)
    • Target window is elevated (admin)
    • DPI scaling issues

Hotkey not registering?

  • Error 1408: Another app has registered the same hotkey combination
  • Try a different key combination in Settings
  • Common conflicts: Ctrl+Shift+Space may be used by screen capture tools, game overlays, etc.

Building from Source

To build your own executable:

pip install pyinstaller
build_win11.bat

The exe will be created in dist/ninjamove.exe.

License

MIT License - See LICENSE file for details.

About

Alt+Drag Window Manager for Windows - Move any window by holding Alt + left-click drag (like Linux/KDE)

Resources

License

Stars

Watchers

Forks

Packages

No packages published