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

Configuration

Type: workspaces

NameTypeDefaultDescription
name_mapMap<string, string or image>{}A map of actual workspace names to their display labels/images. Workspaces use their actual name if not present in the map. See here for information on images.
favoritesMap<string, string[]> or string[][]Workspaces to always show. This can be for all monitors, or a map to set per monitor.
hiddenstring[][]A list of workspace names to never show
icon_sizeinteger32Size to render icon at (image icons only).
formatstring or Map"{label}"The format string for the workspace button. Can be a string to apply to all, or a map with named and unnamed keys. See formatting for more info.
format.namedstring"{label}"The format string for named workspaces.
format.unnamedstring"{label}"The format string for unnamed workspaces.
all_monitorsbooleanfalseWhether to display workspaces from all monitors. When false, only shows workspaces on the current monitor.
sort'added', 'index', 'label' or 'name'labelThe method used for sorting workspaces. added always appends to the end, index sorts by workspace index, label sorts by displayed value, and name sorts by workspace name.

Formatting

The format option allows you to customize the label of the workspace buttons.

The following placeholders are supported:

PlaceholderDescription
{label}The display label (from name_map or the name).
{name}The actual workspace name.
{index}The workspace index.
JSON
{
"end": [
{
"type": "workspaces",
"name_map": {
"1": "",
"2": "",
"3": ""
},
"favorites": ["1", "2", "3"],
"all_monitors": false
}
]
}
TOML
[[end]]
type = "workspaces"
all_monitors = false
favorites = ["1", "2", "3"]
[end.name_map]
1 = ""
2 = ""
3 = ""
YAML
end:
- type: "workspaces"
name_map:
1: ""
2: ""
3: ""
favorites:
- "1"
- "2"
- "3"
all_monitors: false
Corn
{
end = [
{
type = "workspaces",
name_map.1 = ""
name_map.2 = ""
name_map.3 = ""
favorites = [ "1" "2" "3" ]
all_monitors = false
}
]
}

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.