resize_window
Resize windows to specific pixel dimensions in Hyprland. Set exact width and height for active or selected windows using this desktop automation tool.
Instructions
Resize a window to exact pixel dimensions.
Args: width: Target width in pixels height: Target height in pixels target: Window selector. If omitted, resizes the active window.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| target | No |
Implementation Reference
- hyprland_mcp/server.py:164-178 (handler)The resize_window tool handler, which uses hyprctl to dispatch the resizewindowpixel command.
@mcp.tool() async def resize_window( width: int, height: int, target: str | None = None, ) -> str: """Resize a window to exact pixel dimensions. Args: width: Target width in pixels height: Target height in pixels target: Window selector. If omitted, resizes the active window. """ await hyprctl.dispatch("resizewindowpixel", f"exact {width} {height},{target or ''}") return f"Resized to {width}x{height}"