Skip to content

niri-workspaces

Niri workspace indicators with click-to-switch.

Add it to your layout with niri-workspaces:

toml
[[bar.layout]]
monitor = "*"
right = ["niri-workspaces"]

General

FieldTypeDefaultDescription
min-workspace-countu80Always-visible ceiling for numerically-named workspaces.
monitor-specificbooltrueShow only workspaces on this bar's monitor.
hide-trailing-emptybooltrueHide niri's auto-allocated trailing empty workspace.
display-modeDisplayMode"label"What identifies each workspace button.
label-strategyLabelStrategy"name-or-index"How to compose the workspace label when display-mode = "label".
urgent-showbooltruePulse animation on workspaces with urgent windows.
urgent-modeUrgentMode"workspace"Where the urgent pulse is applied.
active-indicatorActiveIndicator"background"Visual indicator for the active workspace.
dividerstring" "Text separator between workspace identity and app icons.
app-icons-showboolfalseShow application icons for windows on each workspace.
app-icons-dedupebooltrueDeduplicate application icons within a workspace.
app-icons-fallbackstring"ld-app-window-symbolic"Fallback icon for applications not matched by app-icon-map.
app-icons-emptystring"tb-minus-symbolic"Icon shown when a workspace has no application windows.
icon-gapSpacing0.3Gap between app icons within a workspace button.
workspace-paddingSpacing0.5Padding for workspace content along the bar direction.
icon-sizeScaleFactor1Scale multiplier for workspace icons.
label-sizeScaleFactor1Scale multiplier for workspace labels and dividers. Range: 0.25-3.0.
workspace-ignorearray of string[]Workspaces to hide from the display.
active-colorColorValue"accent"Color for the active (visible on its output) workspace.
occupied-colorColorValue"fg-muted"Color for occupied workspaces (have windows but not active).
empty-colorColorValue"fg-subtle"Color for empty workspaces and placeholder slots.
container-bg-colorColorValue"bg-surface-elevated"Background color for the workspaces container.
border-showboolfalseDisplay border around the workspaces container.
border-colorColorValue"border-default"Border color for the workspaces container.
workspace-mapWorkspaceMap{}Per-workspace icon and color overrides, keyed by name or id-as-string.
app-icon-mapmap of string{}Application icon mapping with glob pattern support.
left-clickWorkspaceClickAction"focus:this"Action on left click.
middle-clickWorkspaceClickAction""Action on middle click.
right-clickWorkspaceClickAction""Action on right click.
scroll-upWorkspaceClickAction"focus:previous"Action on scroll up.
scroll-downWorkspaceClickAction"focus:next"Action on scroll down.
More about min-workspace-count

Workspaces whose name parses to an integer at or below this value stay visible even when empty. Workspaces with non-numeric names and those above the ceiling follow the normal empty/occupied filtering. When 0 (default), no extra workspaces are forced visible.

More about monitor-specific

When true (default), each bar shows only its own output's workspaces. When false, all workspaces from every output are shown.

More about hide-trailing-empty

Niri keeps one empty workspace at the tail of every output for dynamic allocation.

More about display-mode
  • label (default): show the workspace label per label-strategy
  • icon: show an icon from workspace-map (falls back to label if unmapped)
  • none: show nothing — only app icons visible (if enabled)
More about label-strategy
  • index: index only ("1", "2")
  • name-or-index (default): name when set, index otherwise
  • name-only: name only; unnamed workspaces show nothing
  • index-and-name: "1: web" form; unnamed workspaces show the index alone
More about urgent-mode
  • workspace (default): whole button pulses
  • application: only the urgent app icon pulses, falling back to workspace when app icons are disabled
More about app-icons-dedupe

When true, one icon per unique app_id. When false, one icon per window.

More about icon-size

Applies to identity icons and custom icons from workspace-map. Range: 0.25-3.0.

More about workspace-ignore

Glob patterns matched against the workspace's name (if set), then its index, then its stable id. Examples:

  • "scratch" — hide the workspace named scratch
  • "1?" — hide indices 10-19
More about active-color

In background indicator mode, also used as the button background.

More about workspace-map

Example

toml
[modules.niri-workspaces.workspace-map]
web = { icon = "ld-globe-symbolic", color = "#4a90d9" }
terminal = { icon = "ld-terminal-symbolic" }
More about app-icon-map

Maps window app_id or title to symbolic icon names. Supports:

  • No prefix: matches app_id (e.g. "*firefox*")
  • app: prefix: explicit app_id match (e.g. "app:org.mozilla.*")
  • title: prefix: matches window title (e.g. "title:*YouTube*")

Example

toml
[modules.niri-workspaces.app-icon-map]
"*firefox*" = "ld-globe-symbolic"
"title:*YouTube*" = "ld-youtube-symbolic"

Default configuration

toml
[modules.niri-workspaces]
min-workspace-count = 0
monitor-specific = true
hide-trailing-empty = true
display-mode = "label"
label-strategy = "name-or-index"
urgent-show = true
urgent-mode = "workspace"
active-indicator = "background"
divider = " "
app-icons-show = false
app-icons-dedupe = true
app-icons-fallback = "ld-app-window-symbolic"
app-icons-empty = "tb-minus-symbolic"
icon-gap = 0.30000001192092896
workspace-padding = 0.5
icon-size = 1.0
label-size = 1.0
workspace-ignore = []
active-color = "accent"
occupied-color = "fg-muted"
empty-color = "fg-subtle"
container-bg-color = "bg-surface-elevated"
border-show = false
border-color = "border-default"
left-click = "focus:this"
middle-click = ""
right-click = ""
scroll-up = "focus:previous"
scroll-down = "focus:next"

[modules.niri-workspaces.workspace-map]

[modules.niri-workspaces.app-icon-map]

Released under the MIT License.