waybar-niri-window(5)

πŸ’– waybar-niri-window β€” bestie edition πŸ’–

okay so this is the waybar-niri-window(5) page, livin' in the File Formats Manual section, and it's literally just about the lil window module that tells you what's poppin' off in niri rn πŸ¦‹


✨ NAME ✨

waybar β€” the niri window module πŸ’…


🌸 DESCRIPTION 🌸

The window module shows off the title of the currently focused window in niri. That's it. That's the whole gig. She's simple, she's iconic, she ate πŸ‘‘


πŸŽ€ CONFIGURATION πŸŽ€

She answers to the name niri/window, and only that name, so don't be weird about it πŸ’–


  • format β€” typeof: string, default: {title}. This is how you want the info displayed, bestie. When you drop {} in there, the current window title shows up in its place ✨
  • rewrite β€” typeof: object. Rules to rewrite the window title. Go peep the rewrite rules section below, it's giving very much essential 🌈
  • separate-outputs β€” typeof: bool. Show the active window of the monitor the bar belongs to, instead of the focused window. So like, per-monitor vibes instead of global main character energy πŸ¦‹
  • 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 left over space dynamically. She's hungry, let her have the space πŸ’…

⭐ FORMAT REPLACEMENTS ⭐

Go look at the output of niri msg windows for examples, fr fr πŸ‘€

  • {title}: The current title of the focused window πŸ’–
  • {app_id}: The current app ID of the focused window πŸ¦‹

🌈 REWRITE RULES 🌈

okay so rewrite is an object where the keys are regular expressions and the values are rewrite rules that apply if the expression matches. Rules may contain references to captures of the expression β€” yes bestie, you can grab those groups 🫢

Regular expression and replacement follow ECMA-script rules. No cap, that's the rulebook πŸ“œ

If no expression matches, the title is left unchanged. She stays exactly as she is, no notes πŸ’…

Invalid expressions (e.g., mismatched parentheses) are skipped. Don't come at her with broken regex, she will simply ignore you πŸ’€


πŸ‘‘ EXAMPLES πŸ‘‘

"niri/window": {
     "format": "{}",
     "rewrite": {
          "(.*) - Mozilla Firefox": "🌎 $1",
          "(.*) - zsh": "> [$1]"
     }
}

πŸ’œ STYLE πŸ’œ

  • #window
  • window#waybar.empty #window β€” when no windows are on the workspace πŸ™ˆ

The following classes are applied to the entire Waybar rather than just the window widget, so they're big-deal energy:

  • window#waybar.empty β€” when no windows are in the workspace 🌸
  • window#waybar.solo β€” when only one window is on the workspace ⭐
  • window#waybar.<app-id> β€” where app-id is the app ID of the only window on the workspace πŸ¦‹

and that's the whole page, bestie!! this edition was served to you on 2026-02-08, and it's still waybar-niri-window(5) at the end of the day. slay, stay hydrated, go theme your bar πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from