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

Add ninths #702

Merged
merged 3 commits into from
Jan 4, 2022
Merged

Add ninths #702

merged 3 commits into from
Jan 4, 2022

Conversation

slifty
Copy link
Contributor

@slifty slifty commented Jan 2, 2022

Thank you for this project!

I personally love ninths, as 4k screens are pretty common in the mac ecosystem and it's handy to be able to stack things like terminals. I saw in this discussion that you would be open to a PR for adding ninths to Rectangle so I thought I'd give it a whirl.

What's added

  1. Support for "ninths" calculations, without a UX, meaning it is possible to configure hotkeys via terminal commands for folks who are interested in that sort of thing.

--

Note that an earlier version of this PR included UI / UX for setting shortcuts and accessing ninths via the menu. This was removed as part of the PR review, though the UI still exists in this commit if anybody is interested in that kind of thing down the line.

@rxhanson
Copy link
Owner

rxhanson commented Jan 3, 2022

Thanks for opening the PR! For all new changes, I don't make any UI changes unless there's significant demand. Especially in this case, I only want to add 9 additional actions if there's a ton of people that want it, as I want to keep Rectangle as simple as I can. This also prevents us from having to do the additional work of localization and icons unless assessed necessary.

So, I'm good with merging this in but only if all of the UI elements are reverted out of the storyboard, and the menu items are removed. To remove the menu items, you just set the displayName to nil in WindowAction for all of those new actions. Alternatively, if you really want the menu items in, then you'll need to add a flag for showing them (at which point it would also be necessary to add in icons).

All of the new window actions added can then just be configured via terminal commands, no further code changes necessary, similar to this one: https://github.com/rxhanson/Rectangle/blob/master/TerminalCommands.md#add-an-extra-centering-command-with-custom-size

Screens can get pretty big these days, meaning ninths are a fairly
useful standard window division.  Fortunately, dividing the screen into
a 3x3 grid is the same for landscape and portrait, which makes ninths
a bit less complicated than sixths to implement.

This does NOT include UX, but instead just provides the preference-level
support for ninths hotkeys. This means ninths are available for
power-users who might want them, but for now we won't clutter the UI
with nine new shortcuts for anybody who folks who aren't interested in
ninths.
@slifty
Copy link
Contributor Author

slifty commented Jan 3, 2022

Ah yes that makes complete sense (and makes me feel glad about the two things I hadn't done yet). I've taken the UX out of this PR (I kept it in a branch on my fork in case that UI demand crops up and it ends up being useful, though seems unlikely).

Please let me know if you'd like to see any other modifications (and thank you for considering the PR)

@slifty
Copy link
Contributor Author

slifty commented Jan 3, 2022

Oh I just realized: I should probably update the TerminalCommands.md to expose the existence of the ninths there. I've added that in as a separate commit.

Ninth support has no UX but can be configured via terminal; this
documentation explains to users how that can be done.
@rxhanson rxhanson merged commit bba5c17 into rxhanson:master Jan 4, 2022
@rxhanson
Copy link
Owner

rxhanson commented Jan 4, 2022

Thanks! I'm planning on rolling out a release in the next couple of days.

@slifty slifty deleted the add-ninths branch January 4, 2022 03:38
@Erik262
Copy link

Erik262 commented Jan 27, 2022

Is there a way to get eights?

@rxhanson
Copy link
Owner

@Erik262 You can create a PR just like this one for Rectangle or use Rectangle Pro and create custom shortcuts

@slifty slifty mentioned this pull request Feb 1, 2022
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.

None yet

3 participants