Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

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
NameRequiredDescriptionDefault
widthYes
heightYes
targetNo

Implementation Reference

  • 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}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alderban107/hyprland-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server