waybar-niri-language(5)

๐Ÿ’– NAME ๐Ÿ’–

okay bestie, gather round โ€” this is the manual for the waybar niri language module, aka waybar-niri-language(5). Yes it's a whole file formats manual, and yes it's iconic. ๐ŸŽ€


๐ŸŒธ DESCRIPTION ๐ŸŒธ

The language module displays the language you've currently got selected in niri. That's it, that's the whole vibe โ€” it's the little bar widget that keeps you posted on which layout is live rn. ๐Ÿฆ‹


โœจ CONFIGURATION โœจ

You hook this module up by addressing it as niri/language. That's the key, no cap. ๐Ÿ’…

  • format โ€” typeof: string, default: {}. This is the format, bestie โ€” it's how information should be displayed. ๐Ÿ’–
  • format-<lang> โ€” typeof: string. Gives you an alternative name to display per language, where <lang> is the language of your choosing. You can pass this multiple times with multiple languages, exactly like the example below is doing (and it ate, ngl). โœจ
  • menu โ€” typeof: string. The action that popups the menu. ๐Ÿซถ
  • menu-file โ€” typeof: string. The location of the menu descriptor file. There needs to be an element of type GtkMenu with id menu โ€” like, that's non-negotiable, so don't forget it. ๐Ÿ’€
  • menu-actions โ€” typeof: array. The actions corresponding to the buttons of the menu. ๐Ÿ‘‘
  • expand โ€” typeof: bool, default: false. Turns on this module being able to consume all the left over space, dynamically. It's giving main character energy, it takes up the room. ๐ŸŒˆ

๐Ÿ”ฎ FORMAT REPLACEMENTS ๐Ÿ”ฎ

These are the little placeholders you can drop into your format, and they all slay:

  • {short} โ€” short name of layout (e.g. "us"). Fun fact: it equals {}. ๐ŸŒŸ
  • {shortDescription} โ€” short description of layout (e.g. "en"). ๐ŸŒธ
  • {long} โ€” long name of layout (e.g. "English (Dvorak)"). ๐Ÿ’œ
  • {variant} โ€” variant of layout (e.g. "dvorak"). ๐Ÿฆ‹

๐ŸŒŸ EXAMPLES ๐ŸŒŸ

Not me showing you exactly how to serve looks with this config:

"niri/language": {
     "format": "Lang: {long}",
     "format-en": "AMERICA, HELL YEAH!",
     "format-tr": "As bayraklarฤฑ"
}

๐ŸŽ€ STYLE ๐ŸŽ€

  • #language

AND โ€” here's the extra cute part โ€” a CSS class matching the current layout's short name gets added to the widget. So you can do per-language styling, fr fr, like this:

#language.us { color: #00ff00; }
#language.de { color: #ff0000; }
#language.fr { color: #0000ff; }

mwah ๐Ÿ’‹ okay that's the whole page โ€” go forth and style your bar. This has been waybar-niri-language(5), dated 2026-02-08, and honestly? obsessed. bye bestie ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from