center_window
Center a macOS window on its current or chosen display. Optionally specify the app, window, or resize before centering.
Instructions
Center a macOS window on its current display or a selected display.
Args: app_name: Optional app name, bundle id, or process name window_id: Optional CoreGraphics window id window_index: Optional 1-based index among the app's windows display_index: Optional 1-based display index width: Optional width to apply before centering height: Optional height to apply before centering
Returns: JSON string with final window metadata, or an error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| app_name | No | ||
| window_id | No | ||
| window_index | No | ||
| display_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |