Skip to content

Workspaces

Shows all current workspaces. Clicking a workspace changes focus to it.

Screenshot showing workspaces widget using custom icons with browser workspace focused

Screenshot showing workspaces widget using default names with workspace 4 focused

Example

{
end = [
{
type = "workspaces"
name_map.1 = ""
name_map.2 = ""
name_map.3 = ""
favorites = [ "1" "2" "3" ]
all_monitors = false
}
]
}

Configuration

Type: workspaces

Whether to display workspaces from all monitors. When false, only shows workspaces on the current monitor.

Type: boolean
Default: None

Workspaces which should always be shown. This can either be an array of workspace names, or a map of monitor names to arrays of workspace names.

Default: None

// array format
{
type = "workspaces"
favorites = ["1", "2", "3"]
}
// map format
{
type = "workspaces"
favorites.DP-1 = ["1", "2", "3"]
favorites.DP-2 = ["4", "5", "6"]
}

No description provided.

No description provided.

Type: Array (string)
Default: None

The format string for named workspaces.

The following placeholders are supported:

  • {label}: The display label (from name_map or the workspace name).
  • {name}: The actual workspace name.
  • {index}: The workspace index.

Default: None

No description provided.

No description provided.

Object keys

No description provided.

Type: string
Default: {label}

No description provided.

Type: string
Default: {label}

A list of workspace names to never show.

This may be useful for scratchpad/special workspaces, for example.

Type: Array (string)
Default: []

The size to render icons at (image icons only).

Type: integer
Default: 32

The justification (alignment) of the widget text shown on the bar.

Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'

Map of actual workspace names to custom names.

Custom names can be images.

If a workspace is not present in the map, it will fall back to using its actual name.

Type: object
Default: {}

The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.

Type: 'horizontal' | 'vertical'
Default: 'horizontal'

The method used for sorting workspaces.

  • added always appends to the end.
  • label sorts by displayed value.
  • name sorts by workspace name.

Default: None

Shows workspaces in the order they’re added

Shows workspaces in the order of their displayed labels, accounting for any mappings supplied in name_map. In most cases, this is likely their number.

Workspaces are sorted numerically first, and named workspaces are added to the end in alphabetical order.

Shows workspaces in the order of their real names, as supplied by the compositor. In most cases, this is likely their number.

Workspaces are sorted numerically first, and named workspaces are added to the end in alphabetical order.

Shows workspaces in the order of their index within the compositor.

Styling

SelectorDescription
.workspacesWorkspaces widget box
.workspaces .itemWorkspace button
.workspaces .item.focusedWorkspace button (workspace focused)
.workspaces .item.visibleWorkspace button (workspace visible, including focused)
.workspaces .item.urgentWorkspace button (workspace contains urgent window)
.workspaces .item.inactiveWorkspace button (favourite, not currently open)
.workspaces .item .iconWorkspace button icon (any type)
.workspaces .item .text-iconWorkspace button icon (textual only)
.workspaces .item .imageWorkspace button icon (image only)

For more information on styling, please see the styling guide.