rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.1k stars 742 forks source link

Cycle-through not working for half screens #1287

Closed thomas-bc closed 7 months ago

thomas-bc commented 8 months ago

macOS version: Ventura 13.6.1 Rectangle version: 0.74 (80) Logs if applicable (In Rectangle menu, hold option, "View Logging..."):

Here are the logs for the following sequence of shortcuts (see below for explanation):

Description

Love this app! One quick feedback, it would be great if left/rightHalf would allow the cycle-through behavior like thirds do. Meaning: when hitting a shortcut multiple times (like "FirstTwoThirds"), it cycles through "TwoThirds" positions (see logs above, hitting same shortcut 3 times moves the window across the screen). This allow to use a single shortcut, hitting it multiple times to control which portion of the window to use it on. However, this behavior is not consistent when it comes to RightHalf and LeftHalf. When I hit say the LeftHalf shortcut twice, I do not get the cycling behavior and the window just stays in place. Is it possible to get the cycling behavior implemented, or is this by design for some reason? If you can give me hints as to how to implement this, I'll gladly try to take a crack at implementing it!

I have tried with all available settings of "Repeated commands" behavior but none seem to do the trick. I am using a single monitor.

rxhanson commented 8 months ago

Thanks for reporting. This works properly for me with repeated commands set to cycle 1/2, 2/3, and 1/3 on half actions. Are you sure that you have that set?

thomas-bc commented 8 months ago

cycle 1/2, 2/3, and 1/3 on half actions is not quite the behavior I would like. This cycles the window between being a 1/2, 2/3 and 1/3 display. What I would prefer is if repeated half-actions would cycle the window through different positions (likely 2, one on the left, one on the right), but always 1/2 size. Maybe this could be an additional settings in Repeated commands

rxhanson commented 8 months ago

Are you asking for something like this?

  1. execute left half -> window on left half
  2. execute left half again -> window on right half
  3. execute left half again -> window on left half
  4. etc

It's been a long time since I've looked at this, but there is a default for making a single display act as though it is the adjacent display:

defaults write com.knollsoft.Rectangle traverseSingleScreen -int 1

(Restart the app after that)

You can try that out in conjunction with a cycle display setting and maybe get what you want?

If you really wanted to add this in to Rectangle as an official cycle setting, I don't mind merging PR for it but I wouldn't add it to the UI as an option unless there is high enough demand for it.

Beyond that, there is a custom shortcut builder in Rectangle Pro where you can configure exactly what you want to happen when you repeat shortcuts.

thomas-bc commented 7 months ago

@rxhanson this is exactly what I needed, thank you so much! 🤩

Would you be able to confirm that this should not impact the behavior of when there are multiple screens?

Closing this issue, thanks again!

rxhanson commented 7 months ago

The traverseSingleScreen default only applies when there is one display.