Skip to content

window-title

Active window title with optional app-icon prefix.

Add it to your layout with window-title:

toml
[[bar.layout]]
monitor = "*"
right = ["window-title"]

General

FieldTypeDefaultDescription
formatstring"{{ title }}"Format string for the label.
icon-namestring"ld-app-window-symbolic"Fallback icon when no mapping matches.
icon-mappingsmap of string{}Icon mappings. Glob patterns to icon names.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay text label.
label-max-lengthu3250Max label characters before truncation with ellipsis. Set to 0 to disable.
More about format

Placeholders

  • {{ title }} - Window title
  • {{ app }} - Application name (WM_CLASS on Hyprland)

Examples

  • "{{ title }}" - "README.md - VSCode"
  • "{{ app }}: {{ title }}" - "firefox: GitHub"
More about icon-mappings

Keys are patterns matching the window class (default) or title (when prefixed with title:). Values are icon names from the installed icon set. User mappings are checked before built-in mappings.

Example

toml
[modules.window-title.icon-mappings]
"*firefox*" = "ld-globe-symbolic"
"org.mozilla.*" = "ld-globe-symbolic"
"title:*YouTube*" = "ld-youtube-symbolic"

Colors

FieldTypeDefaultDescription
border-colorColorValue"blue"Border color token.
icon-colorColorValue"auto"Icon foreground color.
icon-bg-colorColorValue"blue"Icon container background color token.
label-colorColorValue"blue"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions

FieldTypeDefaultDescription
left-clickClickAction""Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration

toml
[modules.window-title]
format = "{{ title }}"
icon-name = "ld-app-window-symbolic"
border-show = false
border-color = "blue"
icon-show = true
icon-color = "auto"
icon-bg-color = "blue"
label-show = true
label-color = "blue"
label-max-length = 50
button-bg-color = "bg-surface-elevated"
left-click = ""
right-click = ""
middle-click = ""
scroll-up = ""
scroll-down = ""

[modules.window-title.icon-mappings]

Released under the MIT License.