yambar-modules-i3 - Man Page

This module monitors i3 and sway workspaces

Description

Unlike other modules where the content attribute is just a single particle, the i3 module's content is an associative array mapping i3/sway workspace names to a particle.

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.

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.

Tags

NameTypeDescription
namestringThe workspace name
visibleboolTrue if the workspace is currently visible (on any output)
focusedboolTrue if the workspace is currently focused
urgentboolTrue if the workspace has the urgent flag set
emptyboolTrue if the workspace is empty (Sway only)
statestringOne of urgent, focused, unfocused or invisible (note: unfocused is when it is visible, but neither focused nor urgent).
applicationstringName of application currently focused on this workspace (Sway only - use the xwindow module in i3)
titlestringThis workspace's focused window's title
modestringThe name of the current mode

Configuration

NameTypeReqDescription
contentassociative arrayyesUnlike 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.
sortenumnoHow 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-numbersboolnoIf true, N: prefixes will be stripped from workspace names. Useful together with sort, to have the workspace order fixed.
persistentlist of stringsnoPersistent workspaces. I.e. workspaces that are never removed, even if empty.
left-spacingintnoSpace, in pixels, on the left-side of each rendered workspace particle
right-spacingintnoSpace, in pixels, on the right-side of each rendered workspace particle
spacingintnoShort-hand for setting both left-spacing and right-spacing

Examples

This renders all workspace names, with an * indicating the currently focused one. It also renders the currently focused application name and window title.

  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)

Referenced By

yambar-modules(5).

2024-01-27