Skip to content

Workspaces

Jake Stanger edited this page Aug 14, 2022 · 19 revisions

Workspaces

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

Screenshot showing workspaces widget using custom icons with browser workspace focused

Configuration

Type: workspaces

Name Type Default Description
name_map Map<string, string> {} A map of actual workspace names to their display labels. Workspaces use their actual name if not present in the map.
JSON
{
  "right": [
    {
      "type": "workspaces",
      "name_map": {
        "1": "",
        "2": "",
        "3": ""
      }
    }
  ]
}
TOML
[[right]]
type = "workspaces"

[[right.name_map]]
1 = ""
2 = ""
3 = ""
YAML
right:
  - type: "workspaces"
    name_map:
      1: ""
      2: ""
      3: ""
Corn
{
  right = [
    {
      type = "script"
      path = "/home/jake/.local/bin/phone-battery"
      interval = 5000
    }
  ]
}

Styling

Selector Description
#workspaces Workspaces widget box
#workspaces .item Workspace button
#workspaces .item.focused Workspace button (workspace focused)
Clone this wiki locally