Open Editor Window at middle of the screen

How do I open an editor window to the middle of the screen?
I can’t seem to find the width/height of the Unity Editor itself so I can set the position properly when opening a window.

I am creating my own custom EditorWindow which I want to open dead center of the editor.

I Think you can use the Screen class.
Try something like,

public Vector2 windowSize;

public YourEditorWIndowName() {
windowSize = new Vector2( 500f, 500f );
}

public void SomeMethod() {
position = new Rect( (Screen.width * .5f) - (windowSize.x * .5f), (Screen.height * .5f) - (windowSIze.y * .5f), windowSize.x, windowSize.y );
}

Screen seems to refer to the Game View’s window, not Unite.exe Editor’s size.
I can’t seem to find a way to center a window in Unity.exe.