Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration option for stageSize to be treated as a percentage if less than 1 #1032

Merged
merged 5 commits into from
Dec 16, 2022

Conversation

benminer
Copy link

Hi!

Love this app, thanks for all your work on this.

Since macOS Ventura, I️ am a huge fan of Stage Manager, but I️ switch from my desktop monitor setup to my laptop quite often. With the screens being vastly different sizes, the absolute pixel width value that Rectangle currently allows for is too much when using my laptop dimensions. Like, setting it to the perfect width when on my monitor resulted in the stage area being too large on my laptop.

This PR adds an option to set a percentage of the screen width rather than a simple absolute value. If the percentage is set (defaults to 0), it is used over any set "stageSize" value. I️ did not add UI for this, as it is quite niche, just a reference from the config file if set.

Locally my build works fine, but I️ was not able to fully test as I️ couldn't get the debug .app file to be authorized via Accessibility (probably due to me having the release Rectangle installed as well).

Let me know if there are any issues or questions! I️ would absolutely love if this got shipped, it's been driving me nuts!

@rxhanson
Copy link
Owner

Thanks for contributing.

Rather than adding another defaults variable, we could just check and see if stageSize is less than 1 and use that value as a percentage. With so may defaults variables, I prefer to not add one wherever possible.

@benminer
Copy link
Author

Thanks for contributing.

Rather than adding another defaults variable, we could just check and see if stageSize is less than 1 and use that value as a percentage. With so may defaults variables, I prefer to not add one wherever possible.

Great idea, will do.

@benminer
Copy link
Author

Done!

@benminer benminer changed the title Allow configuration option for "stagePercentageWidth" Allow configuration option for stageSize to be treated as a percentage if less than 1 Dec 15, 2022
@rxhanson
Copy link
Owner

Looks good to me.

Two minor things:

  1. I will change the variable name adjustValue to stageSize if you don't.
  2. I will add a section to https://github.com/rxhanson/Rectangle/blob/master/TerminalCommands.md if you don't.

Not a big deal either way, just let me know if you're going to do it and I'll wait to merge the PR.

@benminer
Copy link
Author

benminer commented Dec 15, 2022

Looks good to me.

Two minor things:

  1. I will change the variable name adjustValue to stageSize if you don't.
  2. I will add a section to https://github.com/rxhanson/Rectangle/blob/master/TerminalCommands.md if you don't.

Not a big deal either way, just let me know if you're going to do it and I'll wait to merge the PR.

I️ can take care of it, I️'ll have some time this evening.

@benminer
Copy link
Author

Looks good to me.
Two minor things:

  1. I will change the variable name adjustValue to stageSize if you don't.
  2. I will add a section to https://github.com/rxhanson/Rectangle/blob/master/TerminalCommands.md if you don't.

Not a big deal either way, just let me know if you're going to do it and I'll wait to merge the PR.

I️ can take care of it, I️'ll have some time this evening.

Done

@rxhanson rxhanson merged commit d896ab1 into rxhanson:master Dec 16, 2022
@rxhanson
Copy link
Owner

Thanks! It might be a few weeks before I make the next release, depending on how many changes get rolled in or if any important bugs come up.

@Aaron-Rumpler
Copy link
Contributor

Locally my build works fine, but I️ was not able to fully test as I️ couldn't get the debug .app file to be authorized via Accessibility (probably due to me having the release Rectangle installed as well).

Those permissions seem to be tied to the app signature (presumably the team id) as well as the bundle id. Easiest fix is to make sure to remove Rectangle from the accessibility section (or run tccutil reset All com.knollsoft.Rectangle from the terminal) between exiting one copy and opening another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants