Center window

Centers the current foreground (or a specific window using the /Window switch) on the current or specified monitor without changing the window's size.

Arguments

monitor — Monitor

Defaults to the monitor the window is currently on. You can find monitors by specifying their number, their monitor handle (HMONITOR, as hexadecimal, formatted as 0xdeadbeef), or by their exact device name ("\\.\DISPLAY1"), serial number or friendly name.

window — Window

Defaults to the current foreground window. Find windows by searching for the process name, window class and window title. All parts support wildcards or regular expressions. When setting up this command in the user interface, a nice editor is provided for the separate parts. When searching from the command line, the syntax is: \[process name]\[window class]\[window title]. All parts are optional, meaning you can use "\\\Untitled - Notepad" to find the window with that title. Wildcards are supported for each part. You can use regular expressions by surrounding the part with forwards slashes: "\\\/.* - Notepad/" will find any Notepad window, and is equivalent to "\\\* - Notepad".