Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

toggle_floating

Switch a window between floating and tiled modes. Specify a target window or toggle the active window's layout.

Instructions

Toggle floating mode for a window.

Args: target: Window selector. If omitted, toggles the active window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo

Implementation Reference

  • The `toggle_floating` tool handler is defined in `server.py` using the `@mcp.tool()` decorator. It dispatches a 'togglefloating' command to the Hyprland server via the `hyprctl` helper.
    @mcp.tool()
    async def toggle_floating(target: str | None = None) -> str:
        """Toggle floating mode for a window.
    
        Args:
            target: Window selector. If omitted, toggles the active window.
        """
        await hyprctl.dispatch("togglefloating", target or "")
        return f"Toggled floating{f' for {target}' if target else ''}"

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