---
name: "mmsg"
section: "1"
platform: "linux"
package: "mangowm"
version: "0.18.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mmsg"
---

# mmsg(1)

send commands to the mango Wayland compositor and receive JSON responses

## NAME

mmsg - send commands to the mango Wayland compositor and receive JSON responses

## SYNOPSIS

**mmsg** \<command\> \[*args*...\]\
 **mmsg** --help \| -h \| help

## DESCRIPTION

**mmsg** connects to a running **mango**(1) compositor via the UNIX domain socket specified by the *MANGO\_INSTANCE\_SIGNATURE* environment variable. It sends the given command and prints the JSON reply to standard output. In **watch** mode it keeps the connection open and prints a stream of updates as they occur.

If **--help**, **-h** or **help** is given, a complete usage summary is printed and the program exits with success.

## COMMANDS

### One-shot queries (get)

All **get** commands print a single JSON object and then close the connection.

- **get version**

  Return compositor version.

- **get cursorpos**

  Return the global pointer position (**x**, **y**) and the monitor under it (**null** if over no output).

- **get keymode**

  Return current keymode.

- **get keyboardlayout**

  Return current keyboard layout.

- **get last\_open\_surface** \[*monitor*\]

  Return the last open surface (application) for the given monitor. If *monitor* is omitted the focused monitor is used.

- **get monitor** \<name\>

  Return details of the named monitor.

- **get focusing-client**

  Return details of the currently focused client.

- **get client** \<id\>

  Return details of the client with the given numeric ID.

- **get tag** \<monitor\> \<index\>

  Return details of a specific tag (1-based index) on the named monitor.

- **get all-clients**

  List all clients.

- **get all-monitors**

  List all monitors.

- **get all-devices**

  List physical input devices, grouped by device, with their types, vendor/product IDs, interface count and matched device rule, if any.

- **get all-layers**

  List all open layer surfaces with their monitor, layer and namespace name.

- **get all-tags**

  List tags for all monitors.

- **get layouts**

  List all available window layouts (**symbol** and **name**).

- **get tags** \<monitor\>

  List tags for a specific monitor.

- **dispatch** \<func\>\[,arg...\] \[client,\<id\>\]

  Invoke an internal compositor function. The function name and its arguments are separated by commas. Optionally add **client,\<id\>** (before or after the function) to target a specific client.\
   Examples:

  - •

    **mmsg dispatch togglefloating**

  - •

    **mmsg dispatch movewin,10,100**

  - •

    **mmsg dispatch movewin,10,100 client,4**

### Persistent streams (watch)

**Watch** commands keep the connection open and continuously output JSON updates. The initial state is sent immediately, followed by updates whenever relevant changes occur.

- **watch monitor** \<name\>

  Stream updates for the named monitor.

- **watch focusing-client**

  Stream updates for the focused client.

- **watch client** \<id\>

  Stream updates for the client with the given ID.

- **watch tags** \<monitor\>

  Stream tag updates for the named monitor.

- **watch all-monitors**

  Stream updates for all monitors.

- **watch all-tags**

  Stream updates for all tags.

- **watch all-clients**

  Stream updates for all clients.

- **watch all-devices**

  Stream the last input device that triggered an event.

- **watch keymode**

  Stream keymode changes.

- **watch keyboardlayout**

  Stream keyboard layout changes.

- **watch last\_open\_surface** \[*monitor*\]

  Stream last open surface changes for a specific monitor (or the focused one).

## ENVIRONMENT

- *MANGO\_INSTANCE\_SIGNATURE*

  Path to the compositor's IPC socket. Set automatically by **mango**(1). If unset, **mmsg** prints an error and exits.

## EXIT STATUS

- **0**

  Success (or help message printed).

- **EXIT\_FAILURE**

  An error occurred (connection refused, send/receive error, etc.).

## SEE ALSO

**mango**(1)

## BUGS

Report issues at the project's issue tracker.
