Displays the current sway mode in a label. If the current sway mode is "default", nothing is displayed. > [!NOTE] > This module only works under the [Sway](https://swaywm.org/) compositor. ## Configuration > Type: `sway-mode` | Name | Type | Default | Description | | --------------------- | ------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `truncate` | `'start'` or `'middle'` or `'end'` or `Map` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. Use the long-hand `Map` version if specifying a length. | | `truncate.mode` | `'start'` or `'middle'` or `'end'` | `null` | The location of the ellipses and where to truncate text from. Leave null to avoid truncating. | | `truncate.length` | `integer` | `null` | The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle. | | `truncate.max_length` | `integer` | `null` | The maximum number of characters before truncating. Leave blank to let GTK automatically handle. |
JSON ```json { "end": [ { "type": "sway-mode", "truncate": "start" } ] } ```
TOML ```toml [[end]] type = "sway-mode" truncate = "start" ```
YAML ```yaml end: - type: "sway-mode" truncate: "start" ```
Corn ```corn { end = [ { type = "sway-mode" truncate = "start" } ] } ```
## Styling | Selector | Description | | ------------ | ---------------------- | | `.sway_mode` | Sway mode label widget | For more information on styling, please see the [styling guide](styling-guide).