yambar-modules-i3(5)

πŸ’… yambar-modules-i3 β€” bestie edition 🌸

okay so this is yambar-modules-i3, from section 5 of the manual (File Formats Manual, if you're keeping score), and no cap it's the glow-up your bar has been waiting for ✨

✨ NAME ✨

i3 β€” this module monitors i3 and sway workspaces πŸͺŸπŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the thing that makes this module lowkey different from every other module: normally content is just a single particle, right? but the i3 module's content is an associative array mapping i3/sway workspace names to a particle. it's giving ✨organized chaos✨ but like, the good kind πŸ’–

you can add an empty workspace name, "", as a catch-all workspace particle. the i3 module will fallback to this entry if it cannot find the workspace name in the content map. so it's literally your safety net, your ride-or-die default 🫢

it also recognizes the special name current, which always represents the currently focused workspace. on Sway, this can be used together with the application and title tags to replace the X11-only xwindow module β€” slay, we love a cross-platform moment πŸ’…


πŸŽ€ TAGS πŸŽ€

here's the whole tag lineup, no skips, no cuts πŸ“

  • name β€” string β€” the workspace name
  • visible β€” bool β€” true if the workspace is currently visible (on any output)
  • focused β€” bool β€” true if the workspace is currently focused
  • urgent β€” bool β€” true if the workspace has the urgent flag set
  • empty β€” bool β€” true if the workspace is empty (Sway only)
  • state β€” string β€” one of urgent, focused, unfocused or invisible (note: unfocused is when it is visible, but neither focused nor urgent)
  • application β€” string β€” name of application currently focused on this workspace (Sway only β€” use the xwindow module in i3)
  • title β€” string β€” this workspace's focused window's title
  • mode β€” string β€” the name of the current mode

🌈 CONFIGURATION 🌈

all the knobs and dials, bestie πŸ”§

  • content β€” associative array β€” required βœ… β€” unlike other modules, content is an associative array mapping workspace names to particles. use "" to specify a default fallback particle, or current for the currently active workspace.
  • sort β€” enum β€” optional β€” how to sort the list of workspaces; one of none, native, ascending or descending, defaults to none. use native to sort numbered workspaces only.
  • strip-workspace-numbers β€” bool β€” optional β€” if true, N: prefixes will be stripped from workspace names. useful together with sort, to have the workspace order fixed.
  • persistent β€” list of strings β€” optional β€” persistent workspaces. i.e. workspaces that are never removed, even if empty. they're immortal fr fr πŸ‘‘
  • left-spacing β€” int β€” optional β€” space, in pixels, on the left-side of each rendered workspace particle
  • right-spacing β€” int β€” optional β€” space, in pixels, on the right-side of each rendered workspace particle
  • spacing β€” int β€” optional β€” short-hand for setting both left-spacing and right-spacing at once. two birds, one icon πŸ’…

⭐ EXAMPLES ⭐

this renders all workspace names, with an * indicating the currently focused one. it also renders the currently focused application name and window title. the way this config eats, honestly 😭πŸ”₯

bar:
  left:
    - i3:
        content:
          "":
            map:
              default: {string: {text: "{name}"}}
              conditions:
                state == focused: {string: {text: "{name}*"}}
          current: { string: {text: "{application}: {title}"}}

🫢 SEE ALSO 🫢

yambar-modules(5), yambar-particles(5), yambar-tags(5), yambar-decorations(5)


and that's the whole page bestie πŸ’œ this one's from the File Formats Manual crowd, dated 2024-04-22, and it's yambar-modules-i3(5) β€” go forth and make your bar iconic 🧚✨

πŸ“¦ where this page comes from