A window arrangement tool for Windows 11 that can move specified windows to specified monitors.
- Configurable hotkey for automatic window arrangement (default:
Ctrl+Alt+I) - Move Opera and "RD Tabs" windows to Monitor 1 (left)
- Move all other windows to Monitor 2 (right, primary monitor)
- Support for custom configuration
- Automatic hotkey re-registration for long-running stability
- Manual hotkey reload for Remote Desktop compatibility issues
- CMD window input support for hotkey reload when hotkeys are not working
- Double-click
setup_and_run.bat - Wait for virtual environment setup and dependency installation
- After program starts, press
Ctrl+Alt+Ito arrange windows
Double-click run.bat to start the program
Ctrl+Alt+I- Arrange windowsCtrl+Alt+Q- Exit programCtrl+Alt+U- Manually reload hotkeys (useful after Remote Desktop connections)
If hotkeys stop working (e.g., after Remote Desktop connections):
- Make sure the CMD window running the script is active/focused
- Press
Ctrl+Rin the CMD window - The script will detect this input and re-register all hotkeys
If you copy the entire directory to a new location, run setup_and_run.bat directly, it will automatically:
- Check if virtual environment is valid
- Recreate if invalid
- Reinstall dependencies
If you've added the directory to system environment variable PATH, you can execute from any location:
run.bat- Automatically switches to script directorysetup_and_run.bat- Automatically switches to script directory
Note: All batch files automatically switch to the script directory to ensure virtual environment and dependency files can be found correctly.
window_arranger.py- Main Python scriptmonitor_detector.py- Monitor information detection scriptrequirements.txt- Python dependency package listsetup_and_run.bat- First-time setup and run scriptrun.bat- Quick start script (automatically detects and fixes virtual environment issues)config.json- Configuration file (customizable hotkeys, etc.)config_example.json- Configuration example file
- Windows 11 system
- Python 3.7+
- Program runs in background, listening for hotkeys
- Press
Ctrl+Alt+Qto exit program
You can customize hotkeys in the config.json file:
{
"hotkey": "ctrl+alt+i",
"exit_hotkey": "ctrl+alt+q",
"reload_hotkey": "ctrl+alt+u"
}Supported hotkey formats:
ctrl+alt+i- Ctrl+Alt+Ictrl+shift+a- Ctrl+Shift+Af12- F12 keyctrl+1- Ctrl+1
You can configure which applications move to which monitor:
{
"monitor_1_apps": ["opera", "RD Tabs"],
"monitor_2_apps": ["*"]
}monitor_1_apps: List of applications to move to Monitor 1monitor_2_apps: List of applications to Monitor 2 (*means all other applications)
Note: Applications not in monitor_1_apps will automatically be moved to Monitor 2.
Additional configuration options for advanced users:
{
"hotkey_test_interval": 1800,
"log_level": "INFO"
}hotkey_test_interval: Interval in seconds for hotkey health checks (default: 1800 = 30 minutes)log_level: Logging level - can be "DEBUG", "INFO", "WARNING", or "ERROR" (default: "INFO")
- Check if the program is running and visible in terminal
- The program automatically re-registers hotkeys every 30 minutes
- After Remote Desktop connections: Press
Ctrl+Alt+Uto manually reload hotkeys - If all hotkeys fail: Use
Ctrl+Rin the CMD window to reload hotkeys
- Symptom: Hotkeys stop working after using Remote Desktop from macOS
- Cause: Remote Desktop may modify keyboard state or hotkey registrations
- Solution:
- First try: Press
Ctrl+Alt+Uto manually reload all hotkeys - If that doesn't work: Press
Ctrl+Rin the CMD window
- First try: Press
- Prevention: Always reload hotkeys after Remote Desktop sessions
- Run
setup_and_run.batto recreate the virtual environment - Don't move or delete the
venvfolder
- Ensure target applications (Opera, RD Tabs) are running
- Check that applications are visible and not minimized