`mmsg` is the command-line interface for the Mango compositor's Inter-Process Communication (IPC) system. It allows users and scripts to query the state of the compositor or subscribe to real-time events.
`mmsg` acts as a client that connects to the Mango compositor via a Unix domain socket defined by the `MANGO_INSTANCE_SIGNATURE` environment variable. It supports two primary modes of operation:
1.**One-shot Request (`get`)**: Sends a query to the compositor, receives a single JSON response, and terminates.
2.**Persistent Stream (`watch`)**: Subscribes to a specific state, receiving continuous JSON updates whenever that state changes.
* **`MANGO_INSTANCE_SIGNATURE`**: Must be set to the path of the Unix socket created by the running Mango instance. This is typically handled automatically when running `mmsg` from within a terminal spawned by the compositor.
| `get cursorpos` | Returns the global pointer position (`x`, `y`) and the monitor under it. |
| `get option <name>` | Returns the current value of a scalar config option. Numbers as numbers, colors as `0xRRGGBBAA` strings, bezier curves as 4-element arrays. |