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 set
34       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       numeric-first:
80           typeof: bool
81           Whether to put workspaces starting with numbers before workspaces
82       that do not start with a number.
83
84       disable-auto-back-and-forth:
85           typeof: bool
86           Whether to disable workspace_auto_back_and_forth when clicking on
87       workspaces. If this is set to true, clicking on a workspace you are al‐
88       ready on won't do anything, even if workspace_auto_back_and_forth is
89       enabled in the Sway configuration.
90

FORMAT REPLACEMENTS

92       {value}: Name of the workspace, as defined by sway.
93
94       {name}: Number stripped from workspace value.
95
96       {icon}: Icon, as defined in format-icons.
97
98       {index}: Index of the workspace.
99

ICONS

101       Additional to workspace name matching, the following format-icons can
102       be set.
103
104default: Will be shown, when no string matches is found.
105urgent: Will be shown, when workspace is flagged as urgent
106focused: Will be shown, when workspace is focused
107persistent: Will be shown, when workspace is persistent one.
108
109

PERSISTENT WORKSPACES

111       Each entry of persistent_workspace names a workspace that should always
112       be shown. Associated with that value is a list of outputs indicating
113       where the workspace should be shown, an empty list denoting all out‐
114       puts.
115
116           "sway/workspaces": {
117               "persistent_workspaces": {
118                   "3": [], // Always show a workspace with name '3', on all outputs if it does not exists
119                   "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists
120                   "5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists
121               }
122           }
123
124       n.b.: the list of outputs can be obtained from command line using
125       swaymsg -t get_outputs
126

EXAMPLES

128           "sway/workspaces": {
129               "disable-scroll": true,
130               "all-outputs": true,
131               "numeric-first": false,
132               "format": "{name}: {icon}",
133               "format-icons": {
134                   "1": "",
135                   "2": "",
136                   "3": "",
137                   "4": "",
138                   "5": "",
139                   "urgent": "",
140                   "focused": "",
141                   "default": ""
142               }
143           }
144

Style

146#workspaces button
147#workspaces button.visible
148#workspaces button.focused
149#workspaces button.urgent
150#workspaces button.persistent
151#workspaces button.current_output
152#workspaces button#sway-workspace-${name}
153
154
155
156                                  2021-11-02         waybar-sway-workspaces(5)
Impressum