Jump to content

Rectangle shortcuts


Recommended Posts

This is an Alfred workflow that allows you to list and access Rectangle shortcuts.

 

image.png.6a4a5ffb0278d2a5161e2c852aaf0e57.png

 

 

Workflow  Source: https://github.com/gohoyer/Alfred-Rectangle-Shortcuts

 

By default, this workflow goes prepackaged with a file named RectangleConfig.json on workflow`s home folder containing default shortcuts for Rectangle.

 

If you use custom shortcuts you can:

  • Export your Rectangle configs as a JSON an replace the file RectangleConfig.json on the home folder of this workfow
  • Save it elsewere and edit the variable RECT_CONFIG_FILE passing the absolute path to your custom config file.

 

The workflow will automatically map the settings on your config file.

Usage

Just type rct and select the option you want or continue typing to filter the options.

 

r/Alfred - Workflow: Rectangle shortcuts for Alfred

Alfred-Rectangle-Shortcuts

 

The icons  still need  some  improvements. If anyone can tell a  good free tool to create icons  I`ll appreciate a lot!
(those were created in  powerpoint lol)

Edited by gohoyer
Link to comment

New release:

 

1.1.0 (https://github.com/gohoyer/Alfred-Rectangle-Shortcuts/releases/tag/1.1.0)

  • Icons were redesigned
  • New option to inform Rectangle config file.

Usage

Just type rct and select the option you want:
main

Shortcuts

Use the list shortcuts option to see avaliable shortcuts and select the one you want to trigger:
shortcuts

Settings

By default, this workflow goes with a file named RectangleConfig.json on workflow`s home folder containing default shortcuts for Rectangle.

If you have custom shortcuts you can use the settings option to inform your own Rectangle config file (you can export the config from Rectangle`s preferences page):
settings

The workflow will automatically map the shortcuts to your config file.

Link to comment
  • 1 month later...

This doesn't seem to be working, at least not for me. 

 

For example if I do rct>maximize when I'm in Apple Notes, it just creates a new line in the note I'm working on

Or if do the same when Finder is the top app, it just makes a bonk noise.

 

All my Rectangle shortcuts are whatever the defaults are, as I've never cared to change them since I just use Rectangle for the snapping (drag to snap) function as I don't like having to remember a million keyboard shortcuts.

 

maximize in Rectangles appears to be the combination of "⌥ ⌘ F"

 

I looked in the /Users/{user}/Library/Application Support/Alfred/Workflow Data folder, but I don't see the mentioned "RectangleConfig.json" file that is supposedly created.

Edited by Smpl
Link to comment
On 3/8/2022 at 8:36 AM, Smpl said:

looked in the /Users/{user}/Library/Application Support/Alfred/Workflow Data folder, but I don't see the mentioned "RectangleConfig.json" file that is supposedly created

Could you try to export the json file from Rectangle and use the  "Manage Settings" option from the workflow  to inform the json location?

Link to comment
On 3/15/2022 at 8:35 AM, gohoyer said:

Could you try to export the json file from Rectangle and use the  "Manage Settings" option from the workflow  to inform the json location?

 

To note: the "Manage Settings" part of the workflow does appear to function. I enter the path to the .json and it does nothing when pressing enter.

Will also note; that I copied the "RectangleConfig.json" file to the /Users/{user}/Library/Application Support/Alfred/Workflow Data folder first, to see if the workflow would use it, but it did not.

 

I manually added the path using the variable button (top right) of the Alfred Preferences window. And now it seems to be working. 

 

I removed/delete the work flow, just to test, and upon adding it back again its not seeing that .json in the Workflow Data folder. Only works again after I manually add the value to the variable 

 

Heads up; your workflow uses python, which has been removed from macOS 12.3 by Apple.

Link to comment

Heyo 👋

 

Had to hop on this one @gohoyer  hopefully this helps ya out @Smpl Well done on the workflow! 

 

I'm on Monterey 12.3 (Intel MacBook) using Rectangle Pro. Python env is a bit of a mixed bag. Python3 installed using brew /usr/local/bin/python3, and of course it graps whatever version it needs for dependancy purposes when needed. For dev, I use pyenv and pyenv-virtualenv ~/.pyenv/shims/python. Anyways, I just ended up making an external shell script. Works great! 

 

Here's a screencast I made showing the setup. Thanks again!

 

https://cln.sh/HRWPKt

Edited by slempke
Link to comment
  • 2 weeks later...

@Smpl and @slempke,

 

I`ve released a new version v1.2.0 trying to address these issues.

 

On this new version I've converted the script filter to a external script and included a Requirements section on README informing that you need to have python3 installed  on your system.

 

Could you try it and tell me if it solved the problems reported above?

Edited by gohoyer
fix hyperlink
Link to comment
  • 1 year later...

@gohoyer Thanks for this workflow. How do you access shortcuts list directly? Pls see if you can add additional keyword or option to go directly to Shortcut list instead of additional click to select "List shortcuts".  I tried this below but one has to press "enter" after rtd to get the options.

image.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...