waybar-niri-window - Man Page

niri window module

Description

The window module displays the title of the currently focused window in niri.

Configuration

Addressed by niri/window

format:
typeof: string
default: {title}
The format, how information should be displayed. On {} the current window title is displayed.

rewrite:
typeof: object
Rules to rewrite window title. See rewrite rules.

separate-outputs:
typeof: bool
Show the active window of the monitor the bar belongs to, instead of the focused window.

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.

Format Replacements

See the output of "niri msg windows" for examples

{title}: The current title of the focused window.

{app_id}: The current app ID of the focused window.

Rewrite Rules

rewrite is an object where keys are regular expressions and values are rewrite rules if the expression matches. Rules may contain references to captures of the expression.

Regular expression and replacement follow ECMA-script rules.

If no expression matches, the title is left unchanged.

Invalid expressions (e.g., mismatched parentheses) are skipped.

Examples

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

Style

The following classes are applied to the entire Waybar rather than just the window widget:

Referenced By

waybar(5).

2024-09-15