rxhanson / Rectangle

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

Center not working on fullscreened app #957

Open escoolioinglesias opened 1 year ago

escoolioinglesias commented 1 year ago

macOS version: Monterey 12.6 Rectangle version: v0.66 (60) Logs if applicable (In Rectangle menu, hold option, "View Logging..."): N/A

ctrl + alt + c doesn't center a window when an app is in fullscreen

My workaround using AppleScript to run shell script, bound to a hotkey by Hammerspoon:

hs.hotkey.bind({"ctrl", "alt"}, "C", function()
    hs.osascript.applescript([[ 

        do shell script "open -g 'rectangle://execute-action?name=bottom-left-sixth' ; open -g 'rectangle://execute-action?name=center'"

    ]])
end)

Cheers!