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       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

FORMAT REPLACEMENTS

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

ICONS

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

PERSISTENT WORKSPACES

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

EXAMPLES

129           "sway/workspaces": {
130               "disable-scroll": true,
131               "all-outputs": true,
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                                  2023-01-11         waybar-sway-workspaces(5)
Impressum