# Window (https://mangowm.github.io/docs/bar/modules/window)

Shows the title of the active window. Place `window` in a `modules-*` list.

```jsonc
"modules-center": ["window"],

"window": {
    "format": "{}",
    "max-length": 300,
    "on-click": "bash ~/.config/mango/scripts/screenshot.sh",
    "on-click-right": "python /home/wrq/tool/ocr.py"
}
```

## Options [#options]

| Option       | Type     | Default | Description                                                                     |
| ------------ | -------- | ------- | ------------------------------------------------------------------------------- |
| `format`     | string   | `{}`    | Format; `{}` is replaced with the window title                                  |
| `max-length` | int (px) | `0`     | Maximum rendered text width in pixels (see [Configuration](/bar/configuration)) |

## Styling [#styling]

```css
#title {
  background: linear-gradient(to top, #bd788a, mix(#bd788a, #fbf1c7, 0.3));
  color: #111111;
}
```