/polygon

A Mac Rectangle inspired window manager for Windows 10/11 powered by AutoHotkey.

Primary LanguageAutoHotkeyMIT LicenseMIT

Polygon

A Mac Rectangle inspired window manager for Windows 10/11 powered by AutoHotkey.

Release

Note

Polygon is still a work in progress and aims to have 100% feature compatibility with Rectangle.

System Requirements

Polygon supports Windows 10/11.

Installation

Installer

You can grab the latest Polygon installer from the latest release. The installer will place a shortcut to your user startup folder to ensure that Polygon start at Windows logon.

Manual

If you rather want to install Polygon manually, please follow the steps outlined below.

  • Download the compiled executable zip file based on your OS architecture from the latest release.
  • Extract the polygon-x[64|86].zip into a location of your choice.
  • Right click the executable and unblock it if Windows complain about security.
  • Open the user startup folder by running the shell:startup command in the run (WIN+R) window.
  • Copy the polygon-x[64|86].exe and the polygon.ini that you downloaded from the previous step and copy them to the shell:startup directory.

If you followed everything correctly, Polygon should start at Windows logon.

Usage

Here are the shortcuts available in Polygon.

Note

Some of the shortcuts Polygon uses conflicts with Window in-built shortcuts and has been mentioned below. If you want to avoid these conflicts, please use the polygon.ini file to configure a different shortcut of your choosing by referring to the AutoHotkey v2 List of Keys documentation.

Status Shortcut Layout Conflicts
CTRL+WIN+C Center
CTRL+WIN+/ Center HD
CTRL+WIN+W Center Half
CTRL+WIN+[ Left Half
CTRL+WIN+] Right Half
CTRL+WIN+R Center Two Third
CTRL+WIN+D First Third Virtual Desktop
CTRL+WIN+F Center Third Feedback Hub
CTRL+WIN+G Last Third
CTRL+WIN+Z Top Left Sixth
CTRL+WIN+X Bottom Left Sixth
CTRL+WIN+V Top Right Sixth
CTRL+WIN+B Bottom Right Sixth
CTRL+WIN+N Top Center Sixth Narrator
CTRL+WIN+M Bottom Center Sixth Magnifier
CTRL+WIN+- Top Half
CTRL+WIN+= Bottom Half
CTRL+WIN+A First Two Thirds
CTRL+WIN+H Last Two Thirds
CTRL+WIN+U Top Left
CTRL+WIN+I Top Right
CTRL+WIN+J Bottom Left
CTRL+WIN+K Bottom Right
CTRL+WIN+; First Fourth
CTRL+WIN+' Second Fourth
CTRL+WIN+, Third Fourth
CTRL+WIN+. Last Fourth
🚧 Next Display
🚧 Previous Display

Bugs and feature requests

Have a bug or a feature request, please open a new issue.

Contributing

Contributions are most welcome to fix bugs or to add new features.

Environment

  • You need to have AutoHotkey v2 installed.
  • I recommend using Visual Studio Code or other VS Code based editors like Cursor.
  • You need to have the AutoHotkey v2 Language Support extension installed by searching with the thqby.vscode-autohotkey2-lsp extension ID.
  • If AutoHotkey is located in a different location other than C:\Program Files\AutoHotkey\v2\AutoHotkey.exe, then set the AutoHotkey2.InterpreterPath setting to point to the correct location.
  • You need to have the EditorConfig for VS Code extension installed by searching with the EditorConfig.EditorConfig extension ID.
  • You need to have the Prettier - Code formatter extension installed by searching with the esbenp.prettier-vscode extension ID.
  • Add the following lines to your VS Code settings.json file to enable AutoHotkey v2 language support.
    {
      "AutoHotkey2.InterpreterPath": "<path to AutoHotkey.exe>",
      "AutoHotkey2.Warn.LocalSameAsGlobal": true,
      "AutoHotkey2.Warn.CallWithoutParentheses": "On"
    }

Structure

The repository is structured pretty flat to keep things simple and find all necessary files easily. Polygon is developed as a single AHK file named polygon.ahk for now. I may in the future refactor it into multiple files if the push comes to shove.

Commit Convention

Before you create a Pull Request, please check whether your commits comply with the commit conventions used in this repository.

When you create a commit I kindly ask you to follow the convention category(scope): message in your commit message while using one of the following categories:

  • feat: all changes that introduce completely new code or new features
  • fix: changes that fix a bug (ideally you will additionally reference an issue if present)
  • refactor: any code related change that is not a fix nor a feature
  • docs: changing existing or creating new documentation (i.e. README, docs for usage of a lib or cli usage)
  • build: all changes regarding the build of the software, changes to dependencies or the addition of new dependencies
  • ci: all changes regarding the configuration of continuous integration (i.e. github actions, ci system)
  • chore: all changes to the repository that do not fit into any of the above categories

Release

Please follow the following release checklist and convention.

  • ❗ The changes for the new version have been added to the CHANGELOG.md file.
  • ❗ The new version has been updated in the polygon.ahk file.
  • ❗ When cutting a release, please use tags with semver like v*.*.* format.

Use the following release note body for each release.

Please refer to [CHANGELOG.md](https://github.com/thesobercoder/polygon/blob/main/CHANGELOG.md) for details.

License

Licensed under the MIT license.