Giter Club home page Giter Club logo

polygon's Introduction

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.

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.

polygon's People

Contributors

ilude avatar thesobercoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

polygon's Issues

Visual Glitch: Information Overlay Is Not Updated When Multiple Actions Are Performed

Describe the bug
If several quick actions are performed succeeding, the information on the overlay is not updated correctly.

To Reproduce

  1. Execute multiple actions succeeding
  2. The information overlay shows only the result of the first action.

Expected behavior
The information overlay always displays the result of the last action, without the need to wait when the information disappears from the first action.

Screenshots

Operating System
Provide the output from systeminfo.

For example:

OS Name:                   Microsoft Windows 11 Pro
OS Version:                23H2 (10.0.22631.2715)

Move Window to next Monitor/Maximize/Almost Maximize

I just wanted to reach out and say I almost have moving a window to the next monitor working. I have the window moving to the next monitor but need to fix the positioning and then write previous monitor.

I have also added Maximize and Almost Maximize.

I will submit a pull request when I am finished.

Feature Request: .ini Option to Hide Information Overlay

Is your feature request related to a problem? Please describe.
When Polygon is used very actively, the information overlay that is shown after each execution of a hotkey, distracts more than it helps.

Describe the solution you'd like
It would be great to have a setting in the .ini file to hide the information overlay in general or in a perfect world by a modifier when triggered.

Describe alternatives you've considered
Editing out myself from the script and recompile it to an executable.

Additional context
I'm using your script together with a "stream deck" as a part of a multi-action trigger. It selects a specific program and then executes a hotkey. For this, it would be great to hide the information overlay.

Bug: Script Doesn’t Work When Window Is Maximized

Describe the bug
The current script cannot move/resize maximized windows. The information overlay shows that a window was moved, but nothing happens until the window isn't maximized anymore.

To Reproduce

  1. Maximize a window of an active program
  2. Try to use Polygon
  3. Information overlay shows that action is executed but nothing happens

Expected behavior
Polygon should work as it normally does, especially since using Win+Left or Win+Right also functions as usual. This creates an extra manual step that is actually unnecessary.

Screenshots
n/a

Operating System

OS Name:                   Microsoft Windows 11 Pro
OS Version:                23H2 (10.0.22631.2715)

Additional context
Various programs open in a maximized state, which interferes with the immediate use of Polygon. Especially if other tools trigger the hotkey of Polygon to move Windows around (in my case, a button press on my Stream Deck), this prevents efficient usage.

Remove toast after layout transition

I wanted to open an issue and check the community's feedback on removing the toast functionality altogether. Even though it is a nice little UI gimmick, it definitely comes in the way when you're trying to switch layouts fast. I always keep it turned off, wanted to know how the community uses it.

Feature Request: Implementation of First Fourth and Last Fourth

Is your feature request related to a problem? Please describe.
I have an ultrawide monitor with a resolution of 5120x1440. In most cases, it makes sense to use thirds. However, there are instances where it would be useful to use the center half in combination with the first quarter and the last quarter.

Describe the solution you'd like
I would appreciate it very much if you could also implement first fourth and last fourth, what would play nicely together with center half.

Describe alternatives you've considered
Manual actions :(

Feature Request: Support of Multiple Hotkeys for an Action

Is your feature request related to a problem? Please describe.
Typically, I prefer pure keyboard shortcuts, but there are cases where combining them with the mouse can be useful. Currently, I have to choose one or the other.

Describe the solution you'd like
Multiple keyboard shortcuts should be assignable to the same action. Ideally, one should also be able to define these shortcuts in the .ini file.

Describe alternatives you've considered

Additional context
I'm currently using the keyboard shortcut CTRL+WIN+NUM1 to CTRL+WIN+NUM3 to arrange windows into thirds. It would be nice to be able to use alternatives to NUM1 through NUM3, including being able to use mouse buttons 1 to 3 (LButton, MButton, RButton). This would be helpful for when your hand is already on the mouse.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.