A professional and robust AutoHotkey v2 script to synchronize window states in Windows. Ideal for workflows that require keeping multiple application instances (such as browsers, terminals, or folders) in sync, or quickly switching between complementary windows.
Windows-Sync provides a responsive interface, native tray integration, support for multiple independent groups, rivals logic, and a complete visual identity.
- ✅
Process or TitleMode (Default) - Blacklist manager now includes a default mode that adds one keyword to both process and title filters in a single action. - ✅ Manual Specific Mode Selection - Users can still explicitly choose
ProcessorTitlewhen they want targeted filtering. - ✅ Blacklist Manager Layout Fix - Manager window width/columns were adjusted so table and buttons (including
Add) fit correctly. - ✅ Parser and Config Robustness - Internal JSON parsing was simplified and hardened to reduce escape-related risks while keeping
config.jsoncompatibility.
- ✅ Multi-Group Synchronization - Create up to 5 independent groups. Windows in the same group always synchronize Minimize/Restore visibility state.
- ✅ Optional Maximized State Sync (Groups + Rivals) - Maximize/normal propagation can be enabled with
Sync Maximized State (Groups/Rivals). - ✅ Focus + Z-Order Sync (Groups) - When focus enters a Group from outside, Windows-Sync applies group focus policy and keeps the clicked window as final focus target.
- ✅ Safe Focus Policy - Switching focus between windows in the same Group does not re-run full group focus sequencing.
- ✅ External Window Priority Preserved - Non-group windows can stay on top when you focus them; the script does not force continuous group refocus.
- ✅ Restore-to-Target Focus - If a Group is minimized and you click one Group window to restore visibility, focus returns to that originally clicked window at the end.
- ✅ Rivals Logic (Visibility Duel) - Pairs of windows where one remains visible while the other automatically minimizes; with maximized sync enabled, visible mode is also preserved.
- ✅ Intelligent Auto-Correction - Rivals are forced into opposite states (one visible, one hidden) when starting synchronization.
- ✅ Robust Synchronization (Polling) - High-frequency monitoring (100ms) compatible with any application (Chrome, VSCode, Office, etc).
- ✅ Session Memory - The script remembers your assignments between activations, allowing quick adjustments without losing previous work.
- ✅ Single-Instance Protection - Prevents duplicate launches of the same file and reuses the active instance UI.
- ✅ Tray Menu & Background Mode - Control synchronization directly from the system tray. Use the new "Minimize to Tray" option to keep the app running silently in the background.
- ✅ Sync Behavior Toggle in Options - Enable or disable maximized-state synchronization at any time.
- ✅ Blacklist Manager in Options - Open a dedicated manager window to maintain blacklist entries.
- ✅ Combined Blacklist Type - Use
Process or Titleto apply one term to both filters at once (default selection in manager). - ✅ Row Context Blacklist Actions - Add process/title terms directly from any
Active Windowsrow. - ✅ Responsive Layout - Interface that adapts to resizing, with flexible columns.
- ✅ Executable Identification - View the process name (
chrome.exe,Code.exe) to easily identify windows. - ✅ Direct Manipulation - Click on any line in the list to open the instant assignment menu.
- ✅ Customizable Return Shortcuts - Choose to use ESC and/or Ctrl + Shift + Tab to bring the control window back during synchronization.
- ✅ Professional Identity - Custom icons embedded in the executable.
- Install AutoHotkey v2.
- Run
windows-sync.ahkdirectly for manual testing and development. - For the compiled executable, no external files are needed.
- Assignment: Click any row of the desired window and choose the corresponding Group or Rival.
- Options:
- Check "Minimize to Tray on Close" to keep the app running in the background.
- Enable "Sync Maximized State (Groups/Rivals)" if you also want normal/maximized state propagation.
- Click "Manage Blacklist" to list, add, and remove blacklist terms.
- In Blacklist Manager,
Process or Titleis the default add mode (applies keyword to both filters). - Configure return shortcuts (ESC, Ctrl+Shift+Tab).
- Synchronize: Click "Sync All" (or use "Toggle Sync" from the tray). Monitoring begins and the button changes to Stop.
- Review While Active: You can keep the GUI open (or reopen via tray/shortcut) without cancelling synchronization.
- Stop: Click Stop in the GUI or use the Tray Menu.
- Relaunch Behavior: If you run the same
.ahkor.exeagain, Windows-Sync brings the existing instance window to front instead of opening a new one. - Quick Blacklist: Right-click a window row to add that row’s process name or title to blacklist.
Windows-Sync now stores runtime settings in config.json at the script root (A_ScriptDir).
Current schema:
{
"schemaVersion": 1,
"blacklist": {
"matchMode": "contains_ci",
"processTerms": [],
"titleTerms": []
}
}processTerms: hides rows when the executable name contains a term.titleTerms: hides rows when the window title contains a term.- Matching is case-insensitive and applied immediately to
Active Windows. - In manager mode
Process or Title, the same keyword is saved in both arrays.
- Focus policy is applied when focus changes from a non-group window to a Group window.
- During policy application, the Group can be reordered for visibility, but final focus is forced back to the clicked Group window.
- If focus stays inside the same Group (for example A -> B), policy is ignored to avoid unnecessary focus churn.
- If you focus a non-group window, Windows-Sync does not continuously steal focus back.
windows-sync.ahk: Main source code.compile.bat: Automated script to generate the.exeexecutable.icon.ico: Official project icon (embedded during compilation).
Double-click the compile.bat file. It will generate Windows-Sync.exe with embedded icon and metadata.
- Icon: Sourced from Icons8 (Usage License).
MIT License - Free for personal and commercial use.