|
| 1 | +waybar-niri-window(5) |
| 2 | + |
| 3 | +# NAME |
| 4 | + |
| 5 | +waybar - niri window module |
| 6 | + |
| 7 | +# DESCRIPTION |
| 8 | + |
| 9 | +The *window* module displays the title of the currently focused window in niri. |
| 10 | + |
| 11 | +# CONFIGURATION |
| 12 | + |
| 13 | +Addressed by *niri/window* |
| 14 | + |
| 15 | +*format*: ++ |
| 16 | + typeof: string ++ |
| 17 | + default: {title} ++ |
| 18 | + The format, how information should be displayed. On {} the current window title is displayed. |
| 19 | + |
| 20 | +*rewrite*: ++ |
| 21 | + typeof: object ++ |
| 22 | + Rules to rewrite window title. See *rewrite rules*. |
| 23 | + |
| 24 | +*separate-outputs*: ++ |
| 25 | + typeof: bool ++ |
| 26 | + Show the active window of the monitor the bar belongs to, instead of the focused window. |
| 27 | + |
| 28 | +*icon*: ++ |
| 29 | + typeof: bool ++ |
| 30 | + default: false ++ |
| 31 | + Option to hide the application icon. |
| 32 | + |
| 33 | +*icon-size*: ++ |
| 34 | + typeof: integer ++ |
| 35 | + default: 24 ++ |
| 36 | + Option to change the size of the application icon. |
| 37 | + |
| 38 | +# FORMAT REPLACEMENTS |
| 39 | + |
| 40 | +See the output of "niri msg focused-window" for examples |
| 41 | + |
| 42 | +*{title}*: The current title of the focused window. |
| 43 | + |
| 44 | +*{app_id}*: The current app ID of the focused window. |
| 45 | + |
| 46 | +# REWRITE RULES |
| 47 | + |
| 48 | +*rewrite* is an object where keys are regular expressions and values are |
| 49 | +rewrite rules if the expression matches. Rules may contain references to |
| 50 | +captures of the expression. |
| 51 | + |
| 52 | +Regular expression and replacement follow ECMA-script rules. |
| 53 | + |
| 54 | +If no expression matches, the title is left unchanged. |
| 55 | + |
| 56 | +Invalid expressions (e.g., mismatched parentheses) are skipped. |
| 57 | + |
| 58 | +# EXAMPLES |
| 59 | + |
| 60 | +``` |
| 61 | +"niri/window": { |
| 62 | + "format": "{}", |
| 63 | + "rewrite": { |
| 64 | + "(.*) - Mozilla Firefox": "🌎 $1", |
| 65 | + "(.*) - zsh": "> [$1]" |
| 66 | + } |
| 67 | +} |
| 68 | +``` |
| 69 | + |
| 70 | +# STYLE |
| 71 | + |
| 72 | +- *#window* |
| 73 | +- *window#waybar.empty #window* When no windows are on the workspace |
| 74 | + |
| 75 | +The following classes are applied to the entire Waybar rather than just the |
| 76 | +window widget: |
| 77 | + |
| 78 | +- *window#waybar.empty* When no windows are in the workspace |
| 79 | +- *window#waybar.solo* When only one window is on the workspace |
| 80 | +- *window#waybar.<app-id>* Where *app-id* is the app ID of the only window on |
| 81 | + the workspace |
0 commit comments