waybar-dwl-window(5)

๐Ÿฆ‹ waybar-dwl-window(5) โ€” the dwl window module, bestie edition

okay so this is the manual page for the waybar-dwl-window module, and it lives in section 5 (File Formats Manual) of the waybar docs. it's giving niche but iconic, and honestly? we're obsessed. let's get into it ๐Ÿ’…


โœจ NAME โœจ

waybar โ€” the dwl window module ๐ŸชŸ

๐ŸŒธ DESCRIPTION ๐ŸŒธ

the window module literally just displays the title of the currently focused window in DWL. that's it. that's the whole vibe. main character window title energy, no cap โœจ

๐Ÿ’– CONFIGURATION ๐Ÿ’–

you address this one by dwl/window โ€” that's its little address in your config, its whole identity fr fr.

here's every single knob you can turn, and yes bestie, we're doing all of them, no skipping ๐Ÿ™ˆ

  • format โ€” typeof: string; default: {title} โ€” this is the format, aka how the information should actually be displayed. the blueprint for the glow-up.
  • rotate โ€” typeof: integer โ€” a positive value rotates the text label, and the rotation goes in 90 degree increments. so like, a full spin is 4. math is math ๐ŸŒ€
  • max-length โ€” typeof: integer โ€” the maximum length in characters the module should display. she's capping the word count.
  • min-length โ€” typeof: integer โ€” the minimum length in characters the module should accept. the bare minimum, literally.
  • align โ€” typeof: float โ€” where the label sits inside the module. 0 is left-aligned, 1 is right-aligned. heads up: if the module is rotated, it follows the flow of the text instead. it's fluid like that ๐Ÿ’ซ
  • justify โ€” typeof: string โ€” how the text sits inside the module's label. your options are 'left', 'right', or 'center'. pick your fighter ๐ŸŽ€
  • on-click โ€” typeof: string โ€” command to run when you click on the module.
  • on-click-middle โ€” typeof: string โ€” command to run when you middle-click on the module using the mousewheel. yep, that click counts too.
  • on-click-right โ€” typeof: string โ€” command to run when you right-click on the module.
  • on-update โ€” typeof: string โ€” command to run when the module gets updated. she's refreshed โœจ
  • on-scroll-up โ€” typeof: string โ€” command to run when you scroll up on the module.
  • on-scroll-down โ€” typeof: string โ€” command to run when you scroll down on the module.
  • smooth-scrolling-threshold โ€” typeof: double โ€” the threshold to be used when scrolling. so your scrolls don't go feral.
  • tooltip โ€” typeof: bool; default: true โ€” option to disable the tooltip on hover. yes, the default is tooltips ON, so if you want them gone you gotta say so.
  • rewrite โ€” typeof: object โ€” rules to rewrite the module format output. see rewrite rules for the whole tea ๐Ÿ‘€
  • icon โ€” typeof: bool; default: false โ€” option to hide the application icon.
  • icon-size โ€” typeof: integer; default: 24 โ€” option to change the size of the application icon.
  • expand โ€” typeof: bool; default: false โ€” enables this module to consume all leftover space dynamically. greedy in the best way, she ate ๐Ÿ’…

๐Ÿ”ฎ FORMAT REPLACEMENTS ๐Ÿ”ฎ

these are the little magic words you can drop into your format, and here's exactly what each one gives you:

  • {title} โ€” the title of the focused window.
  • {app_id} โ€” the app_id of the focused window.
  • {layout} โ€” the layout of the focused window.

๐Ÿงš REWRITE RULES ๐Ÿงš

rewrite is an object where the keys are regular expressions and the values are rewrite rules that apply if the expression matches. the rules may contain references to captures of the expression โ€” yes, you can point back at what you caught, cute right? ๐Ÿซถ

the regular expression and the replacement both follow ECMA-script rules. periodt.

if no expression matches, the format output is left unchanged. she simply stays as she is ๐Ÿ’œ

invalid expressions โ€” like mismatched parentheses, we've all been there ๐Ÿ˜ญ โ€” are skipped.

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

here's a whole look, copy it, love it, make it yours:

"dwl/window": {
     "format": "{}",
     "max-length": 50,
     "rewrite": {
          "(.*) - Mozilla Firefox": "๐ŸŒŽ $1",
          "(.*) - zsh": "> [$1]"
     }
}

look at those captures popping off. $1 said I'll take it from here ๐Ÿ”ฅ


๐Ÿ’€ quick reminder before you go: invalid expressions are skipped, not screamed about. mismatched parentheses won't break your bar, they'll just silently not apply. so if a rewrite isn't working, double-check those parens bestie, iykyk.

and that's the whole page, bestie!! this was waybar-dwl-window(5), section 5, dated 2026-02-08 โ€” go forth and make your bar gorgeous, you absolute icon ๐Ÿ‘‘๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from