1waybar-sway-workspaces(5) File Formats Manual waybar-sway-workspaces(5)
2
3
4
6 waybar - sway workspaces module
7
9 The workspaces module displays the currently used workspaces in Sway.
10
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 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
87 {value}: Name of the workspace, as defined by sway.
88
89 {name}: Number stripped from workspace value.
90
91 {icon}: Icon, as defined in format-icons.
92
93 {index}: Index of the workspace.
94
96 Additional to workspace name matching, the following format-icons can
97 be set.
98
99 • default: Will be shown, when no string matches is found.
100 • urgent: Will be shown, when workspace is flagged as urgent
101 • focused: Will be shown, when workspace is focused
102 • persistent: Will be shown, when workspace is persistent one.
103
104
106 Each entry of persistent_workspace names a workspace that should always
107 be shown. Associated with that value is a list of outputs indicating
108 where the workspace should be shown, an empty list denoting all out‐
109 puts.
110
111 "sway/workspaces": {
112 "persistent_workspaces": {
113 "3": [], // Always show a workspace with name '3', on all outputs if it does not exists
114 "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists
115 "5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists
116 }
117 }
118
119 n.b.: the list of outputs can be obtained from command line using
120 swaymsg -t get_outputs
121
123 "sway/workspaces": {
124 "disable-scroll": true,
125 "all-outputs": true,
126 "format": "{name}: {icon}",
127 "format-icons": {
128 "1": "",
129 "2": "",
130 "3": "",
131 "4": "",
132 "5": "",
133 "urgent": "",
134 "focused": "",
135 "default": ""
136 }
137 }
138
140 • #workspaces button
141 • #workspaces button.visible
142 • #workspaces button.focused
143 • #workspaces button.urgent
144 • #workspaces button.persistent
145 • #workspaces button.current_output
146 • #workspaces button#sway-workspace-${name}
147
148
149
150 2022-05-23 waybar-sway-workspaces(5)