Git Product home page Git Product logo

rectangle's Introduction

Rectangle

Build

Rectangle is a window management app based on Spectacle, written in Swift.

Screenshot

System Requirements

Rectangle supports macOS v10.15+. The last version that is supported for macOS 10.13 and 10.14 is https://github.com/rxhanson/Rectangle/releases/tag/v0.73.

Installation

You can download the latest dmg from https://rectangleapp.com or the Releases page.

Or install with brew cask:

brew install --cask rectangle

How to use it

The keyboard shortcuts are self explanatory, but the snap areas can use some explanation if you've never used them on Windows or other window management apps.

Drag a window to the edge of the screen. When the mouse cursor reaches the edge of the screen, you'll see a footprint that Rectangle will attempt to resize and move the window to when the click is released.

Snap Area Resulting Action
Left or right edge Left or right half
Top Maximize
Corners Quarter in respective corner
Left or right edge, just above or below a corner Top or bottom half
Bottom left, center, or right third Respective third
Bottom left or right third, then drag to bottom center First or last two thirds, respectively

Ignore an app

  1. Focus the app that you want to ignore (make a window from that app frontmost).
  2. Open the Rectangle menu and select "Ignore app"

Execute an action by URL

Open the URL rectangle://execute-action?name=[name]. Do not activate Rectangle if possible.

Available values for [name]: left-half, right-half, center-half, top-half, bottom-half, top-left, top-right, bottom-left, bottom-right, first-third, center-third, last-third, first-two-thirds, last-two-thirds, maximize, almost-maximize, maximize-height, smaller, larger, center, restore, next-display, previous-display, move-left, move-right, move-up, move-down, first-fourth, second-fourth, third-fourth, last-fourth, first-three-fourths, last-three-fourths, top-left-sixth, top-center-sixth, top-right-sixth, bottom-left-sixth, bottom-center-sixth, bottom-right-sixth, specified, reverse-all, top-left-ninth, top-center-ninth, top-right-ninth, middle-left-ninth, middle-center-ninth, middle-right-ninth, bottom-left-ninth, bottom-center-ninth, bottom-right-ninth, top-left-third, top-right-third, bottom-left-third, bottom-right-third, top-left-eighth, top-center-left-eighth, top-center-right-eighth, top-right-eighth, bottom-left-eighth, bottom-center-left-eighth, bottom-center-right-eighth, bottom-right-eighth, tile-all, cascade-all

Example, from a shell: open -g "rectangle://execute-action?name=left-half"

Terminal Commands for Hidden Preferences

See TerminalCommands.md

Differences with Spectacle

  • Rectangle uses MASShortcut for keyboard shortcut recording. Spectacle used its own shortcut recorder.
  • Rectangle has additional window actions: move windows to each edge without resizing, maximize only the height of a window, almost maximizing a window.
  • Next/prev screen thirds is replaced with explicitly first third, first two thirds, center third, last two thirds, and last third. Screen orientation is taken into account, as in first third will be left third on landscape and top third on portrait.
    • You can however emulate Spectacle's third cycling using first and last third actions. So, if you repeatedly execute first third, it will cycle through thirds (first, center, last) and vice-versa with the last third.
  • There's an option to have windows traverse across displays on subsequent left or right executions.
  • Windows will snap when dragged to edges/corners of the screen. This can be disabled.

Common Known Issues

Rectangle doesn't have the ability to move to other desktops/spaces

Apple never released a public API for Spaces. Other apps that move windows between spaces use unsupported or undesirable ways to achieve this. If Apple decides to release a public API for it, I'll add it in.

Window resizing is off slightly for iTerm2

By default iTerm2 will only resize in increments of character widths. There might be a setting inside iTerm2 to disable this, but you can change it with the following command.

defaults write com.googlecode.iterm2 DisableWindowSizeSnap -integer 1

Rectangle appears to cause Notification Center to freeze

This appears to affect only a small amount of users. To prevent this from happening, uncheck the box for "Snap windows by dragging". See issue 317.

Troubleshooting

If windows aren't resizing or moving as you expect, here's some initial steps to get to the bottom of it. Most issues of this type have been caused by other apps.

  1. Make sure macOS is up to date.
  2. Restart your machine (this often fixes things right after a macOS update).
  3. Make sure there are no other window manager applications running.
  4. Make sure that the app whose windows are not behaving properly does not have any conflicting keyboard shortcuts.
  5. Try using the menu items to execute a window action or changing the keyboard shortcut to something different so we can tell if it's a keyboard shortcut issue or not.
  6. Enable debug logging, as per the instructions in the following section.
  7. The logs are pretty straightforward. If your calculated rect and your resulting rect are identical, chances are that there is another application causing issues. Save your logs if needed to attach to an issue if you create one.
  8. If you suspect there may be another application causing issues, try creating and logging in as a new macOS user.

Try resetting the macOS accessibility permissions for Rectangle:

tccutil reset All com.knollsoft.Rectangle

Or, this can be done with the following steps instead of the tccutil terminal command.

  1. Close Rectangle if it's running
  2. In System Settings -> Privacy & Security -> Accessibility, first disable Rectangle, then remove it with the minus button. (it's important to do both of those steps in that order)
  3. Restart your mac.
  4. Launch Rectangle and enable settings for it as prompted.

View Debug Logging

  1. Hold down the alt (option) key with the Rectangle menu open.
  2. Select the "View Logging..." menu item, which is in place of the "About" menu item.
  3. Logging will appear in the window as you perform Rectangle commands.

Import & export JSON config

There are buttons for importing and exporting the config as a JSON file in the settings tab of the preferences window.

Upon launch, Rectangle will load a config file at ~/Library/Application Support/Rectangle/RectangleConfig.json if it is present and will rename that file with a time/date stamp so that it isn't read on subsequent launches.

Preferences Storage

The configuration for Rectangle is stored using NSUserDefaults, meaning it is stored in the following location: ~/Library/Preferences/com.knollsoft.Rectangle.plist Note that shortcuts in v0.41+ are stored in a different format and will not load in prior versions.

That file can be backed up or transferred to other machines.

If you are using Rectangle v0.44+, you can also use the import/export button in the Preferences pane to share to your preferences and keyboard shortcuts across machines using a JSON file.

Note

If you are having issues with configuration options persisting after an application restart and you've installed using Homebrew, you will need to uninstall and reinstall with the --zap flag.

brew uninstall --zap rectangle
brew install rectangle

Uninstallation

Rectangle can be uninstalled by quitting the app and moving it to the trash. You can remove the Rectangle defaults from your machine with the following terminal command:

defaults delete com.knollsoft.Rectangle

Tip

If you are uninstalling after installing with Homebrew, you should include the --zap flag to ensure it removes the plist entries too.

brew uninstall --zap rectangle

Contributing

Logic from Rectangle is used in the Multitouch app. The Rectangle Pro app is entirely built on top of Rectangle. If you contribute significant code or localizations that get merged into Rectangle, send me an email for a free license of Multitouch or Rectangle Pro. Contributors to Sparkle, MASShortcut, or Spectacle can also receive free Multitouch or Rectangle Pro licenses.

Localization

If you would like to contribute to localization, all of the translations are held in the Main.strings per language. If you would like to add a localization but one doesn't currently exist and you don't know how to create one, create an issue and a translation file can be initialized.

Pull requests for new localizations or improvements on existing localizations are welcome.

Running the app in Xcode (for developers)

Rectangle uses Swift Package Manager to install Sparkle and MASShortcut.

The original repository for MASShortcut was archived, so Rectangle uses my fork. If you want to make any changes that involve MASShortcut, please make a pull request on my fork.

rectangle's People

Contributors

aaron-rumpler avatar antiasi avatar bjornorri avatar c-harding avatar c-lake avatar decodism avatar e-magon avatar firebotql avatar fv3rdugo avatar hadialharbi2020 avatar hiro0218 avatar imasaru avatar isaacy2012 avatar jerry23011 avatar jrthsr700tmax avatar marekmasek avatar nat avatar nebeker avatar networm avatar patrick-stripe avatar rudifa avatar rxhanson avatar ryonakano avatar sh-cho avatar skyrilhd avatar snomos avatar vincentpun avatar woblerr avatar yann-r avatar yk4to 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar

rectangle's Issues

Can't move window to next display past a fullscreen window

macOS version: 10.14.6
Rectangle version: 0.12

Not sure if you'd consider it a bug or a feature but it's something that Rectangle does differently from Spectacle and that could be improved in my opinion.

I have three displays (1, 2, and 3) arranged horizontally. Display 2 is showing a full-screen app. Display 1 is showing a (non-full-screen) window that I want to move to display 3 (also not in full-screen).

I press the shortcut to move the window to the next display. The window moves to display 2 and becomes hidden behind the full-screen app. I press the shortcut again but nothing happens.

I'd like the shortcut to continue to work and move the window from display 2 to display 3. This is how it worked in Spectacle.

Repeatedly doing "Right Half" or "Left Half" will instead resize to different thirds

I used to use Spectacle, so I think this behavior is the same as that app, but it is not what is described in the docs or the help shortcuts. If I have a window active, like Firefox, and then do "Right Half" repeatedly, it will do the following: first click, resize to right half of window, second click, it will take up the right 2/3s of my screen, third click: it will take up 1/3 of my screen, fourth click: back to only 1/2 of my screen.

With the new explicit thirds shortcuts, I would like to disable the different thirds resizing when using the "Half" shortcuts. This seems like it's at least documented incorrectly, possibly it's a real bug. And depending on that, this could be a feature request or a bug report.

Ignored apps are not receiving keypress events from shortcuts

If I have an application that Rectangle is ignoring, and I try to use a shortcut in the app that matches a shortcut in Rectangle, the app will not receive the key combo. For example, I'd like to use Cmd+Option+<Arrow Up> within Visual Studio Code, which is also a shortcut set in Rectangle; although I have toggled "Ignore Code" to true, the action is not registered to VSCode, but the window also doesn't resize. Spectacle had this feature, which I would appreciate, as otherwise I have to quit Rectangle for in-app shortcuts to work properly.

Support for "next third"

Hello!
Thanks for working on this project!
One feature that I miss from Spectacle is the "Next Third" option.
I would love to see that in the next release.

I'm new to swift but I will see if I can't figure out how to port this over.

Where are settings stored?

I want to uninstall rectangle and then install it using brew, but I don't want to re-configure it. Where does Rectangle store it's config/settings files?

Small space between iTerm2 windows

Thank you for this awesome project! I'm glad to see a Spectacle-based project that's actually actively maintained.

I noticed one issue though, there seems to be a small space around iTerm2.

Versions

  • MacOS: 10.14.5
  • Rectangle: 0.1.2 (3)
  • iTerm2: 3.2.9

Screenshots

image

The gap can be seen between the two windows, and to the right of the iterm2 window. There is no gap when using two Brave Browser windows next to each other. Do you think this is a Rectangle issue, or an iTerm2 issue?

Ps. When this project grows, will you think about adding an issue template? It's easier for you to get the information you need, and easier for people that fill in an issue to provide the information. I tried to provide as much as possible though :)

Have a nice day,
@yochem

Move full screen app ("space") to another monitor?

Spectacle works with normal windows, not with apps in full-screen mode ("Spaces" in Mission Control's terminology I believe). Rectangle is the same but I was wondering whether it would be possible to use the same "Next Display" / "Previous Display" command for full-screen apps as well?

Use 2-3 times more memory than Spectacle

Works fine but I don't see any significant differences with Spectacle in terms of reactivity. Also the app uses more memory than Spectacle (not really a problem but still).

Cannot perform actions on VS Code window

macOS version: 10.14.6
Rectangle version: 0.10 (14)

As title says, VS Code does not respond to commands from Rectangle. All options are greyed out when VS Code has focus

Provide a way to install via brew cask

First off, I want to say how excited I am to see a new spectacle implementation. I would love to use this when it has gained feature parity. Could you provide a way to install this app via brew cask with the next release?

Center Two Thirds

This layout feels missing with all one-third and two-third options. I find this particular window position very useful – on a full-size display. Alternatives available – center one-third, full-screen – are significantly different.

The work around I currently use is two shortcuts – 'First Two Thirds' and 'Center Third'. Would be great to reduce that to a single dedicated shortcut.

In terms of shortcut itself looks like ⌃⌥R would fit nicely in the current scheme. Between 'First Two Third' ⌃⌥E and 'Last Two Thirds' ⌃⌥T. That with alternate layout, not sure about the default one.

Let me know if you find the idea good – I may be able to submit a PR

Change priority of overlapping commands

OS: Mojave 10.14.6
Rectangle: Version 0.10 (14)

Many of the commands have overlapping default shortcuts:
Next Display: Control + Option + Command + Right Arrow,
Next Third: Control + Alt + Right Arrow,
Make Larger: Control + Option + Shift + Right Arrow,
Upper Right: Control + Option + Right Arrow
Right Half: Option + Command + Right Arrow

This can cause some strange behavior on multi monitor setups when you try to move a window between displays. When you enter the key combination for Next Display, the window can move to the next display, but then move back to the right half of the previous display right after.

It would be better if when the key combination for Next Display was input, Rectangle did not also execute the commands that share a subset of the key combination. This would make the default movement commands more consistent, as right now it feels there is some randomness involved in their actual execution order.

Snapping issues with Preview

macOS 10.15
MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports)

When the sidebar is visible on Preview, it seems to overlap the windows when snapping. This is not the case when the sidebar is hidden. The cause seems to be that Preview will not allow the pdf to zoom out any further. I am not sure if anything can be done to mediate this?

Thanks in advance!

Screenshot 2019-10-14 at 20 38 18

Traverse displays vertically

Hi, first of all - love the app, so thank you very much!
I've enabled the 'traverse displays' option in Preferences, which is great for multiple monitors. However, I have my MacBook screen below my external monitor, so I have to send the windows sideways to get it onto the other display. Would it be simple enough to enable traversal of displays in a vertical orientation, in addition to the current horizontal behaviour?
Cheers, Campbell

Continuous Integration for automated builds

I know you are not accepting new feature requests, but I think it would be nice to have automated builds for this project so you'd get all the benefits of knowing if a pull request is still building and passing tests.

I'm wondering if the project should use one of these:

  • Github Actions
  • Travis
  • CircleCI
  • Something else?

Here's some related documentation:

I did not go into too much details on how you currently publish new versions and/or if you already have a CI setup somewhere, but I feel like this project would benefit from the above.

Thanks for making this amazing app 🎉

Ability to define own grid "size"

Thoughts or opinions on letting the user define their own grid size? I use an ultra-wide monitor and for my setup, 1/3rds do not make sense for my use case. 1/4 grid does (terminal right most 1/4, editor middle 1/2, left size whatever else i want).

I'll be happy to open a PR and help out but I didn't want to start the work if you weren't on board with the idea.

allow option-based shortcuts

I suggest to allow option-based shortcuts, such as option-left, option-right. Since they are less used compared to command-based and control-based, hence less likely to have shortcut conflicts.

Share preferences across devices

Is there a way to do this right now by copying/pasting a preference file of some sort?

I use multiple machines and I'd like to try to keep the Rectangle preferences in sync some how.

How do I ignore an app?

To ignore an app:

  1. Focus the app that you want to ignore (make a window from that app frontmost).
  2. Open the Rectangle menu and select "Ignore "
    image

To un-ignore an app that you have selected to ignore, simply bring that app frontmost again, open the Rectangle menu, and deselect "Ignore "

Ignoring an app means that when the app is frontmost, keyboard shortcuts are un-registered from macOS. When the app is no longer frontmost, keyboard shortcuts are re-registered with macOS.

Right and bottom thirds not working

Thanks for creating a Spectacle replacement, what works better on macOS Catalina.

Correct Behavior

Resizing multiple times to Left Half or Top Half work fine, with:

  1. 1/2
  2. 2/3
  3. 1/3

Bug

But resizing multiple times to Right Half or Bottom Half doesn't work the same, and does:

  1. 1/2
  2. 1/2 towards the middle of the screen at starting at the 2/3 location, but it doesn't touch the side of the screen anymore!
  3. no 3rd resize option at all, and starts up with 1/2 again!

Custom ratio for Almost Maximise

Hello!
I've been using Rectangle for a bit and I'm finding this app useful.

I have a question though. Is it possible to have the ratio used in the AlmostMaximizeCalculation.swift file editable through a setting?
I'm referring to this part of the code:

// Resize
calculatedWindowRect.size.width = visibleFrameOfScreen.width * 0.9
calculatedWindowRect.size.height = visibleFrameOfScreen.height * 0.9

Instead of using the hardcoded value 0.9 it would be cool to have a variable user-defined in the settings.

Thank you!

Cannot map cmd+ctrl+option+shift+q

macOS version: Catalina
Rectangle version: 0.12

I checked "Allow any shortcut"

I am mapping keyboard with super modifier.

q w e
a s d
z x c

I used those shortcuts in the past with slate in the past.
If it's not possible to do. Can I suggest a feature. It would be cool if with one shortcut I could rotate window around the clock in the corners. Then there wouldn't be a need for a multiple corners shortcuts (at least it will free multiple keybindings).

Thanks.

Way to progressively move a window across multiple monitors

Thanks for your work on this, I have a feature request:

It would be nice if (for example), the shortcut to move a window to the right half could be pressed again to move it to the left half of the monitor to the right (and then to the right half of that monitor, etc.), if it exists. Currently, as I understand they are separate shortcuts.

Next display shortcut unresponsive (permanently greyed out in menu)

macOS version: macOS 10.15.2 (19C57)
Rectangle version: Version 0.14 (18)

Expected Behaviour: I can move a window to another display with shortcut ctrl+option+cmd+-> or by clicking the menu item for it.

Observed Behaviour: The menu item is greyed out, when pressing the shortcut, the window is moved in some unexpected way (if it's full width/height, nothing happens, otherwise it moves to the centre without changing proportions).

To be noted: I had a similar issue with spectacle, which is why I switched. On spectacle, I heard a "pling" sound (error like) when trying to move window to next display.

When I reprogram the shortcut, it's still greyed out - what does this tell me as a user? It may be there's an issue somewhere that I don't understand correctly.

I've tested with various apps: Spotify, Chrome, Finder, it doesn't seem to be specific.

Here's a screenshot of the menu item greyed out.

Screenshot 2019-12-27 at 20 18 54

Here are the logs, it seems like my (soft) Display 2 is not recognised as being present. Is that meant to be that way?

2019-12-27T20:30:37+01:00: AX position proposed: (600.0, 373.0), result: (600.0, 373.0)
2019-12-27T20:30:37+01:00: AX sizing proposed: (480.0, 327.0), result: (480.0, 327.0)
2019-12-27T20:30:37+01:00: nextDisplay | display: (0.0, 0.0, 1680.0, 1027.0), calculatedRect: (600.0, 373.0, 480.0, 327.0), resultRect: (600.0, 373.0, 480.0, 327.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display

Testing on El Capitan

I'm trying to test on OS X 10.11.6 but I can't authorize Rectangle in Accessibility. I think this is because the Finder has placed a grey do-not-enter symbol over the icon and I'm having to run the Rectangle.app/Contents/MacOS/Rectangle executable from the terminal. After a while Rectangle exits with:

dyld: lazy symbol binding failed: Symbol not found: _os_log_type_enabled
Referenced from: /Volumes/HD/Rectangle.app/Contents/MacOS/../Frameworks/libswiftos.dylib
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _os_log_type_enabled
Referenced from: /Volumes/HD/Rectangle.app/Contents/MacOS/../Frameworks/libswiftos.dylib
Expected in: /usr/lib/libSystem.B.dylib

Trace/BPT trap: 5

Please consider adding a donate link and update README

First up: you're awesome. Thank you for doing this.

This mostly fixes my issues with "resize to fullscreen" action, and as soon as I can determine enough information to write a decent issue, I plan on it.
I am mediocre with Swift. I am god awful with Objective-C. Exploring your code is more fun and provides more insights for me.

It progressively bummed me out watching the Spectacle inactivity. I wish I could have donated / paid for that app, both to thank the author and help motivate / facilitate future updates to Spectacle.

I can fully see the motivation for building and releasing this when I see what you're doing with Multitouch (which I am checking out!). Giving licenses to the contributors: you're doing this right. It's nice to see all of the above.

So I want to put my money where my mouth is! I want to thank you for your work and motivate you to keep the updates coming. What's the best way to do that?

If you tell me: "buy a license for Multitouch" ... I'll grab that asap.

BUT

I sincerely request that you consider adding a Donate link. I want to put my money where my mouth is and specifically support your open-source development.

For the annoyance of having to signup for Paypal, configuring Personal Fundraising, and updating the README... I promise you at least $6, haha.

Hope you consider it.

Right traverse is 'backwards' when using 'traverse on subsequent left/right keypress'

When I use the Next/Previous Display shortcut Rectangle traverse my displays in the following order (just keep this in mind, because this is how I'd expect the next part of Rectangles functionality to work when using half actions):

  • Next: 1 --> 2 --> 3 --> 4 --> loop back around
  • Prev: 4 --> 3 --> 2 --> 1 --> loop back around

But when Traverse displays on subsequent left or right execution is enabled:
Screen Shot 2019-10-11 at 6 22 14 PM

Rectangle moves my window left (or backwards, however you'd like to look at it) as I'd expect and traverses my displays in the correct (backwards) order: 4 --> 3 --> 2 --> 1 --> loop back around.

However, Rectangle traverses my displays in a the same order when transitioning right (or forward): 4 --> 3 --> 2 --> 1 --> loop back around which seems reverse to how I'd expect it to happen in my head (and is also visually jarring when you're pressing right but it jumps to the next Previous display).

Here's my displays layout for reference:
Screen Shot 2019-10-11 at 6 23 48 PM

Maximize function does not resize to fullscreen in certain cases

Depending on window placement (and possibly size of the window?), when I trigger the Maximize function, there are certain cases where it resizes or moves the window, but does not resize the window to the maximum size allowed on the first call. In the end, I am able to chain together a few Maximize calls to get the desired effect, usually requiring 3 calls (or pressing the hotkey 3 times in a row).

Here's some screenshots to demonstrate what I am talking about.

  1. Starting window placement (I used Rectangle's Bottom Left)

Screen Shot 2019-09-27 at 6 39 09 AM

  1. After I trigger Maximize (first invocation):

Screen Shot 2019-09-27 at 6 39 22 AM

  1. After I trigger Maximize (second time):

Screen Shot 2019-09-27 at 6 39 35 AM

  1. After I trigger Maximize (third time) I finally get the desired result:

Screen Shot 2019-09-27 at 6 39 44 AM

As I said, this only happens in certain cases. If I use Top Left for some window, and then I try to Maximize, I get the desired effect on the first call.

These are the only cases I can confirm are 100% reproducible for me. However, I see the issue quite a bit with various window placements / sizes. When I start the window in the Bottom Right placement, I get annoyingly variable results when triggering Maximize next. Sometimes it will succeed on the first call but more often it will require two calls.

I am not running any external monitors, I experience these issues only using the built-in display on my Macbook Pro. I don't run multi-monitor at all these days, but I can easily set this up and test under that setup as well.

So to provide some more background (and probably useless info):

  1. Before Rectangle, I used Spectacle. Spectacle had the same Maximize function. I first saw this issue with Spectacle. I am assuming that some Mac OS update broke this, but I sadly can't provide more details here. I finally got annoyed enough that I decided to at least try to fix this.
  2. When I went looking through the open and closed issues in the Spectacle repo, I found a lot of info, and I THINK I REMEMBER finding some comments detailing the mechanism in which Spectacle resizes windows and that some Mac OS update had changed this? I was planning on filing an issue detailing my experience and referencing those comments, but almost immediately after, I found your comment introducing Rectangle in another issue. I lost focus, downloaded Rectangle, forgot what I was doing originally, and closed that browser window with all the tabs.

As I said, that last bit was probably useless info, haha.


I would sincerely appreciate you looking into this!
As always, willing to provide any additional info you need in case this is not easily reproducible.

Broken resize/reposition behaviour sometimes, on some apps

With some apps, sometime after rebooting the machine, resizing does not resize a window to its proper size.

On the screen recording, I am trying to resize the window to the left half by repeatedly pressing command+alt+left. As you can see, the window does not get repositioned/resized properly

ezgif-4-5e6caee4f299

I am using Mac OS 10.14.6 on a 13 inch MacBook Pro, with a 1440p display. The issue happens on any size display

A similar issue also happens with spectacle

Vertical 1/3 postions

Love the tool, was a heavy Spectacle user and you pushed it a bit further and ironed out few issues, well done 👍

Though there's one small thing that was in spectacle but I'm missing in rectangle is the vertical 1/3 positions: I use one of my 2 screens vertically (and I know a lot of devs do that!) and it would be very useful to have it back! And to not clutter more the shortcuts/options, it could be done using the existing 1/3 positions shortcuts, just detecting if screen height > screen width to apply vertical thirds instead of horizontal one, what do you think?

I can take a look a it to propose a PR if you're ok with that?

Moving from a higher/bigger resolution to a smaller screen

macOS version: Catalina 10.15.2
Rectangle version: 0.14

I recently switched from Spectacle to Rectangle. Thanks for picking up the project since Spectacle stopped development. I've run into an issue that I don't believe I had when using Spectacle. Let me try and explain. I have a 2015 MacBook Pro I use and have a Dell u3415w (3880 x 1400) hooked up as an extended monitor. Here are the steps

  1. Have an application open on the dell monitor at a bigger resolution that what would be scaled as maximized on the MBP screen (this doesn't have to be a maximized window on the dell monitor)
  2. Move the application to the next display (i.e. the MBP screen) using the next display keyboard shortcut
  3. Now the application is oversized for the MBP screen
  4. Attempting to use the maximize keyboard shortcut does not work and the application stays oversized for the MBP screen.
    • I have to use the "Almost Maximize" selection and then can use the Maximize shortcut to make it work

I captured the logs below

2019-12-24T07:12:58-05:00: AX position proposed: (0.0, 23.0), result: (0.0, 23.0)
2019-12-24T07:12:58-05:00: AX sizing proposed: (1280.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:58-05:00: AX position proposed: (-587.0, 23.0), result: (-587.0, 23.0)
2019-12-24T07:12:58-05:00: AX sizing proposed: (1867.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:58-05:00: nextDisplay | display: (0.0, 0.0, 1280.0, 777.0), calculatedRect: (0.0, 23.0, 1280.0, 777.0), resultRect: (-587.0, 23.0, 1867.0, 777.0), srcScreen: DELL U3415W, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2019-12-24T07:12:59-05:00: AX position proposed: (0.0, 23.0), result: (0.0, 23.0)
2019-12-24T07:12:59-05:00: AX sizing proposed: (1280.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:59-05:00: AX position proposed: (-587.0, 23.0), result: (-587.0, 23.0)
2019-12-24T07:12:59-05:00: AX sizing proposed: (1867.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:59-05:00: maximize | display: (0.0, 0.0, 1280.0, 777.0), calculatedRect: (0.0, 23.0, 1280.0, 777.0), resultRect: (-587.0, 23.0, 1867.0, 777.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2019-12-24T07:12:59-05:00: AX position proposed: (0.0, 23.0), result: (0.0, 23.0)
2019-12-24T07:12:59-05:00: AX sizing proposed: (1280.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:59-05:00: AX position proposed: (-587.0, 23.0), result: (-587.0, 23.0)
2019-12-24T07:12:59-05:00: AX sizing proposed: (1867.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:59-05:00: maximize | display: (0.0, 0.0, 1280.0, 777.0), calculatedRect: (0.0, 23.0, 1280.0, 777.0), resultRect: (-587.0, 23.0, 1867.0, 777.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2019-12-24T07:12:59-05:00: AX position proposed: (0.0, 23.0), result: (0.0, 23.0)
2019-12-24T07:12:59-05:00: AX sizing proposed: (1280.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:59-05:00: AX position proposed: (-587.0, 23.0), result: (-587.0, 23.0)
2019-12-24T07:12:59-05:00: AX sizing proposed: (1867.0, 777.0), result: (1867.0, 777.0)
2019-12-24T07:12:59-05:00: maximize | display: (0.0, 0.0, 1280.0, 777.0), calculatedRect: (0.0, 23.0, 1280.0, 777.0), resultRect: (-587.0, 23.0, 1867.0, 777.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2019-12-24T07:13:05-05:00: AX position proposed: (64.0, 61.69999999999993), result: (64.0, 62.0)
2019-12-24T07:13:05-05:00: AX sizing proposed: (1152.0, 699.3000000000001), result: (1152.0, 699.0)
2019-12-24T07:13:05-05:00: almostMaximize | display: (0.0, 0.0, 1280.0, 777.0), calculatedRect: (64.0, 61.69999999999993, 1152.0, 699.3000000000001), resultRect: (64.0, 62.0, 1152.0, 699.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display
2019-12-24T07:13:06-05:00: AX position proposed: (0.0, 23.0), result: (0.0, 23.0)
2019-12-24T07:13:06-05:00: AX sizing proposed: (1280.0, 777.0), result: (1280.0, 777.0)
2019-12-24T07:13:06-05:00: maximize | display: (0.0, 0.0, 1280.0, 777.0), calculatedRect: (0.0, 23.0, 1280.0, 777.0), resultRect: (-0.0, 23.0, 1280.0, 777.0), srcScreen: Built-in Retina Display, destScreen: Built-in Retina Display, resultScreen: Built-in Retina Display

What I would like to happen here.

I see two potential solutions to this issue (if you agree it's an issue)

  1. When switching to another screen with a smaller resolution than what the application is currently using then just default to having the application maximized on the smaller screen (if I recall correctly, this is what Spectacle did)
  2. Don't automatically adjust the resolution but fix the issue with the maximize shortcut if the application is at a higher resolution than the screen

I believe my personal preference would be for the first option.

Again, thanks a lot for picking this up! Spectacle, and now this app, is one of the first things I install when I setup a new computer 🙏

Feature Request: Useless Gaps

On larger screens, many find it aesthetically pleasing to have gaps between tiled windows. Several other window managers support this and I would love to see this added as an option to Rectangle.

There has been some discussion of this (including a patch) in the Spectacle issue tracker, which has since been removed. But here is a cached version for reference.

Thanks for the great work!

Documentation

So here's the thing: I never used Spectacle.

Your homepage tells me nearly nothing about what this app does. The github projects page tells me some, but it has no real info about how to configure or use this thing. :-/

Top Half/Bottom Half - to implement 1/3 & 2/3 options

I have just switched from Spectacle and one feature that I used quite often that Rectangle doesn't implement is the Top 1/3 option. I see you have implemented this for the "Left Half" & "Right half" options where multiple innvocations will resize the window to 2/3 and then 1/3.

I think I might be able to add this feature as the project looks fairly straight forward and well laid out. However as per your contributing guidlines, is this something that you would accept via a PR?

Window blinks on next screen when moved to edge adjacent to that screen

macOS version: 10.15.1
Rectangle version: 0.10 (14)

Sometimes on a window on a 3 parallel displays setup, the window jumps to another screen while you are moving it (haven't tested with more or less monitors).

Pick any window control + option + Command + <- for example, press that combination severaly times and eventually the bugs happens.

Report as window manager to system

Hi!

Small thing, but maybe worth adding. When using Spectacle, the system (or at least, neofetch), knows the WM is Spectacle. This is not the case with Rectangle.
image
image
(look for the WM: part)

I don't know if this is a neofetch or a Rectangle issue, and I couldn't get a result when searching for 'wm' in the Spectacle repo. Any ideas?

Installation tutorial?

Hi. This is great news.
Any tutorial for people who don't deal with source code? I couldn't find a webpage, and there's nothing about installation in the README currently

(btw, I came here from the Spectacle repository. There's a link, but that's it).

Cannot map ⌥⌘H

I prefer to use ⌥⌘H / ⌥⌘J / ⌥⌘K / ⌥⌘L for "Left/Right/Top/Bottom Half" commands, and while I was able to remap to ⌥⌘J / ⌥⌘K / ⌥⌘L I'm not able to remap "Left Half" to ⌥⌘H. Getting this error:

The key combination ⌥⌘H cannot be used
This shortcut cannot be used because it is already used by the menu item ‘Hide Others’.

It seems that Hide Others command is mapped implicitly, without a option for changing it.
Is there a way to unmap ⌥⌘H via a config file? Also, are there any other "hidden" mappings? I couldn't find any list of them, and I found ⌥⌘H in the source code by doing search for "Hide Others" on GH.

Rectangle 0.3 (5)
macOS Mojave 10.14.6

Improve README readability for muggles

The readme mentions NSUserDefaults and MASShortcut which I - as a muggle in macOS development - don't understand.

Would it be possible to clarify these terms or rephrase ? 🙂

Sound feedback

With the newest version there is a sound feedback every time I use a shortcut.
These seems to be an issue or rather one should have the option to deactivate the sound feedback.

Doesn't launch on startup

With rectangle 0.12 on Mac OS 10.14.6, rectangle is configured to launch on startup, but it doesn't, I need to manually open the app every time I restart.

Next/Previous display is broken in v0.4

Hey Ryan (@rxhanson),

Rectangle's been working great until I powered up an eGPU and connected my external displays to it. From this point, I can no longer shift windows between displays ({Next,Previous} Display).

Inside of each individual display, however, I can do all the usual stuff if I drag the window over to that particular display: half, 2/3, 1/3, corners, full screen, center, etc.

As a quick test I quit Rectangle and fired Spectacle back up and I am able to shift between monitors again. Happy to help you debug just let me know what you'd like to know.

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.