-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
✨ Option to use macOS center instead of screen center #77
Comments
Definitely interested in implementing this! Unfortunately, Loop doesn't have access to any other app's window's |
Unfortunately, I can't help with that :( |
Unfortunately not :( Out of curiosity, how were you able to "MacOS center" the Safari window in the screenshot? Is there a built-in command to center a window? Or was it a different window manager? |
Still Moom |
Alright, I found the formula to center a window on a screen (I spent way too much time on this 😂), and it places windows in the equivalent position of let halfScreenHeight = screenFrame.height / 2
let windowHeightPercent = windowFrame.height / screenFrame.height
let yOffset: CGFloat = (0.5 * windowHeightPercent - 0.5) * halfScreenHeight
newWindowFrame = CGRect(
x: screenFrame.midX - windowFrame.width / 2,
y: screenFrame.midY - windowFrame.height / 2 + yOffset,
width: windowFrame.width,
height: windowFrame.height
) Now I guess all that's left is to actually put it in Loop! |
Alright, sorry for the wait! |
Happy New Year too! |
…-instead-of-screen-center` ✨ #77 Option to use macOS center instead of screen center
Feature Request Description
Press return to center a window
uses the actual screen center, but I found more ergonomic to have windows in the default macOS center by usingfunc center()
. I'd like to propose it as an alternative, making the user select the preferred one.Screenshots
macOS center:
Screen center:
Additional Context
No response
Final Checks
The text was updated successfully, but these errors were encountered: