1waybar-sway-workspaces(5)     File Formats Manual    waybar-sway-workspaces(5)
2
3
4

NAME

6       waybar - sway workspaces module
7

DESCRIPTION

9       The workspaces module displays the currently used workspaces in Sway.
10

CONFIGURATION

12       Addressed by sway/workspaces
13
14       all-outputs:
15            typeof: bool
16            default: false
17            If set to false, workspaces will only be shown on the output they
18       are on. If set to true all workspaces will be shown on every output.
19
20       format:
21            typeof: string
22            default: {value}
23            The format, how information should be displayed.
24
25       format-icons:
26            typeof: array
27            Based on the workspace name and state, the corresponding icon gets
28       selected. See icons.
29
30       disable-scroll:
31            typeof: bool
32            default: false
33            If set to false, you can scroll to cycle through workspaces. If
34       set to true this behaviour is disabled.
35
36       disable-click:
37            typeof: bool
38            default: false
39            If set to false, you can click to change workspace. If set to true
40       this behaviour is disabled.
41
42       smooth-scrolling-threshold:
43            typeof: double
44            Threshold to be used when scrolling.
45
46       disable-scroll-wraparound:
47            typeof: bool
48            default: false
49            If set to false, scrolling on the workspace indicator will wrap
50       around to the first workspace when reading the end, and vice versa. If
51       set to true this behavior is disabled.
52
53       enable-bar-scroll:
54            typeof: bool
55            default: false
56            If set to false, you can't scroll to cycle throughout workspaces
57       from the entire bar. If set to true this behaviour is enabled.
58
59       disable-markup:
60            typeof: bool
61            default: false
62            If set to true, button label will escape pango markup.
63
64       current-only:
65            typeof: bool
66            default: false
67            If set to true. Only focused workspaces will be shown.
68
69       persistent_workspaces:
70            typeof: json (see below)
71            default: empty
72            Lists workspaces that should always be shown, even when non exis‐
73       tent
74
75       on-update:
76            typeof: string
77            Command to execute when the module is updated.
78
79       disable-auto-back-and-forth:
80            typeof: bool
81            Whether to disable workspace_auto_back_and_forth when clicking on
82       workspaces. If this is set to true, clicking on a workspace you are al‐
83       ready on won't do anything, even if workspace_auto_back_and_forth is
84       enabled in the Sway configuration.
85
86       alphabetical_sort:
87            typeof: bool
88            Whether to sort workspaces alphabetically. Please note this can
89       make "swaymsg workspace prev/next" move to workspaces inconsistent with
90       the ordering shown in Waybar.
91
92       warp-on-scroll:
93            typeof: bool
94            default: true
95            If set to false, you can scroll to cycle through workspaces with‐
96       out mouse warping being enabled. If set to true this behaviour is dis‐
97       abled.
98

FORMAT REPLACEMENTS

100       {value}: Name of the workspace, as defined by sway.
101
102       {name}: Number stripped from workspace value.
103
104       {icon}: Icon, as defined in format-icons.
105
106       {index}: Index of the workspace.
107
108       {output}: Output where the workspace is located.
109

ICONS

111       Additional to workspace name matching, the following format-icons can
112       be set.
113
114default: Will be shown, when no string matches is found.
115urgent: Will be shown, when workspace is flagged as urgent
116focused: Will be shown, when workspace is focused
117persistent: Will be shown, when workspace is persistent one.
118high-priority-named: Icons by names will be shown always for that
119           workspaces, independent by state.
120
121

PERSISTENT WORKSPACES

123       Each entry of persistent_workspace names a workspace that should always
124       be shown. Associated with that value is a list of outputs indicating
125       where the workspace should be shown, an empty list denoting all out‐
126       puts.
127
128           "sway/workspaces": {
129                "persistent_workspaces": {
130                     "3": [], // Always show a workspace with name '3', on all outputs if it does not exists
131                     "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists
132                     "5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists
133                }
134           }
135
136       n.b.: the list of outputs can be obtained from command line using
137       swaymsg -t get_outputs
138

EXAMPLES

140           "sway/workspaces": {
141                "disable-scroll": true,
142                "all-outputs": true,
143                "format": "{name}: {icon}",
144                "format-icons": {
145                     "1": "",
146                     "2": "",
147                     "3": "",
148                     "4": "",
149                     "5": "",
150                     "high-priority-named": [ "1", "2" ],
151                     "urgent": "",
152                     "focused": "",
153                     "default": ""
154                }
155           }
156

Style

158#workspaces button
159#workspaces button.visible
160#workspaces button.focused
161#workspaces button.urgent
162#workspaces button.persistent
163#workspaces button.current_output
164#workspaces button#sway-workspace-${name}
165
166
167
168                                  2023-08-16         waybar-sway-workspaces(5)
Impressum